From e29099a2d17f7fdacc400503ef8a0303b560609a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 21 Oct 2021 20:37:32 +0200 Subject: [PATCH 1/2] git-sh-i18n: remove unused eval_ngettext() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "eval_ngettext()" function has been orphaned since its last user was removed in a74b35081c5 (rebase: drop support for `--preserve-merges`, 2021-09-07). See b8fc9e43a7d (i18n: rebase-interactive: mark here-doc strings for translation, 2016-06-17) for the commit that added these eval_ngettext() wrappers. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- git-sh-i18n.sh | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/git-sh-i18n.sh b/git-sh-i18n.sh index e3d9f4836d..a15c0620db 100644 --- a/git-sh-i18n.sh +++ b/git-sh-i18n.sh @@ -51,12 +51,6 @@ gettext_without_eval_gettext) ) } - eval_ngettext () { - ngettext "$1" "$2" "$3" | ( - export PATH $(git sh-i18n--envsubst --variables "$2"); - git sh-i18n--envsubst "$2" - ) - } ;; *) gettext () { @@ -70,12 +64,6 @@ gettext_without_eval_gettext) ) } - eval_ngettext () { - (test "$3" = 1 && printf "%s" "$1" || printf "%s" "$2") | ( - export PATH $(git sh-i18n--envsubst --variables "$2"); - git sh-i18n--envsubst "$2" - ) - } ;; esac From c1e10b2dce28b434127870ed09293cf9adc9fcc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 21 Oct 2021 20:37:33 +0200 Subject: [PATCH 2/2] git-sh-setup: remove messaging supporting --preserve-merges MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove messages that were last used by the code removed in a74b35081c5 (rebase: drop support for `--preserve-merges`, 2021-09-07). Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- git-sh-setup.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/git-sh-setup.sh b/git-sh-setup.sh index cee053cdc3..960982f9d5 100644 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -217,9 +217,6 @@ require_clean_work_tree () { then action=$1 case "$action" in - rebase) - gettextln "Cannot rebase: You have unstaged changes." >&2 - ;; "rewrite branches") gettextln "Cannot rewrite branches: You have unstaged changes." >&2 ;; @@ -235,14 +232,7 @@ require_clean_work_tree () { if test $err = 0 then action=$1 - case "$action" in - rebase) - gettextln "Cannot rebase: Your index contains uncommitted changes." >&2 - ;; - *) - eval_gettextln "Cannot \$action: Your index contains uncommitted changes." >&2 - ;; - esac + eval_gettextln "Cannot \$action: Your index contains uncommitted changes." >&2 else gettextln "Additionally, your index contains uncommitted changes." >&2 fi