summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-10-29 15:43:13 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-10-29 15:43:13 -0700
commit942843e8dd3acd895c4179587ca83bebd857d811 (patch)
tree032b770f67a9ceb629aab5bb2d9e47c61e9b0d8b
parentMerge branch 'ab/plug-random-leaks' (diff)
parentgit-sh-setup: remove messaging supporting --preserve-merges (diff)
downloadtgif-942843e8dd3acd895c4179587ca83bebd857d811.tar.xz
Merge branch 'ab/sh-retire-rebase-preserve-merges'
Code clean-up to remove unused helpers. * ab/sh-retire-rebase-preserve-merges: git-sh-setup: remove messaging supporting --preserve-merges git-sh-i18n: remove unused eval_ngettext()
-rw-r--r--git-sh-i18n.sh12
-rw-r--r--git-sh-setup.sh12
2 files changed, 1 insertions, 23 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
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