Skip to content

Commit 942843e

Browse files
committed
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()
2 parents 192a3fa + c1e10b2 commit 942843e

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

git-sh-i18n.sh

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ gettext_without_eval_gettext)
5151
)
5252
}
5353

54-
eval_ngettext () {
55-
ngettext "$1" "$2" "$3" | (
56-
export PATH $(git sh-i18n--envsubst --variables "$2");
57-
git sh-i18n--envsubst "$2"
58-
)
59-
}
6054
;;
6155
*)
6256
gettext () {
@@ -70,12 +64,6 @@ gettext_without_eval_gettext)
7064
)
7165
}
7266

73-
eval_ngettext () {
74-
(test "$3" = 1 && printf "%s" "$1" || printf "%s" "$2") | (
75-
export PATH $(git sh-i18n--envsubst --variables "$2");
76-
git sh-i18n--envsubst "$2"
77-
)
78-
}
7967
;;
8068
esac
8169

git-sh-setup.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,6 @@ require_clean_work_tree () {
217217
then
218218
action=$1
219219
case "$action" in
220-
rebase)
221-
gettextln "Cannot rebase: You have unstaged changes." >&2
222-
;;
223220
"rewrite branches")
224221
gettextln "Cannot rewrite branches: You have unstaged changes." >&2
225222
;;
@@ -235,14 +232,7 @@ require_clean_work_tree () {
235232
if test $err = 0
236233
then
237234
action=$1
238-
case "$action" in
239-
rebase)
240-
gettextln "Cannot rebase: Your index contains uncommitted changes." >&2
241-
;;
242-
*)
243-
eval_gettextln "Cannot \$action: Your index contains uncommitted changes." >&2
244-
;;
245-
esac
235+
eval_gettextln "Cannot \$action: Your index contains uncommitted changes." >&2
246236
else
247237
gettextln "Additionally, your index contains uncommitted changes." >&2
248238
fi

0 commit comments

Comments
 (0)