Skip to content

Commit de88c1c

Browse files
jonseymourgitster
authored andcommitted
git-am: take advantage of gettextln and eval_gettextln.
Signed-off-by: Jon Seymour <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3da5c54 commit de88c1c

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

git-am.sh

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,8 @@ safe_to_abort () {
8989
then
9090
return 0
9191
fi
92-
(
93-
gettext "You seem to have moved HEAD since the last 'am' failure.
94-
Not rewinding to ORIG_HEAD" &&
95-
echo
96-
) >&2
92+
gettextln "You seem to have moved HEAD since the last 'am' failure.
93+
Not rewinding to ORIG_HEAD" >&2
9794
return 1
9895
}
9996

@@ -102,9 +99,9 @@ stop_here_user_resolve () {
10299
printf '%s\n' "$resolvemsg"
103100
stop_here $1
104101
fi
105-
eval_gettext "When you have resolved this problem run \"\$cmdline --resolved\".
102+
eval_gettextln "When you have resolved this problem run \"\$cmdline --resolved\".
106103
If you would prefer to skip this patch, instead run \"\$cmdline --skip\".
107-
To restore the original branch and stop patching run \"\$cmdline --abort\"."; echo
104+
To restore the original branch and stop patching run \"\$cmdline --abort\"."
108105

109106
stop_here $1
110107
}
@@ -118,7 +115,7 @@ go_next () {
118115

119116
cannot_fallback () {
120117
echo "$1"
121-
gettext "Cannot fall back to three-way merge."; echo
118+
gettextln "Cannot fall back to three-way merge."
122119
exit 1
123120
}
124121

@@ -611,9 +608,9 @@ do
611608
go_next && continue
612609

613610
test -s "$dotest/patch" || {
614-
eval_gettext "Patch is empty. Was it split wrong?
611+
eval_gettextln "Patch is empty. Was it split wrong?
615612
If you would prefer to skip this patch, instead run \"\$cmdline --skip\".
616-
To restore the original branch and stop patching run \"\$cmdline --abort\"."; echo
613+
To restore the original branch and stop patching run \"\$cmdline --abort\"."
617614
stop_here $this
618615
}
619616
rm -f "$dotest/original-commit" "$dotest/author-script"
@@ -648,7 +645,7 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."; ec
648645

649646
if test -z "$GIT_AUTHOR_EMAIL"
650647
then
651-
gettext "Patch does not have a valid e-mail address."; echo
648+
gettextln "Patch does not have a valid e-mail address."
652649
stop_here $this
653650
fi
654651

@@ -699,7 +696,7 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."; ec
699696
action=again
700697
while test "$action" = again
701698
do
702-
gettext "Commit Body is:"; echo
699+
gettextln "Commit Body is:"
703700
echo "--------------------------"
704701
cat "$dotest/final-commit"
705702
echo "--------------------------"
@@ -763,16 +760,16 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."; ec
763760
# working tree.
764761
resolved=
765762
git diff-index --quiet --cached HEAD -- && {
766-
gettext "No changes - did you forget to use 'git add'?
763+
gettextln "No changes - did you forget to use 'git add'?
767764
If there is nothing left to stage, chances are that something else
768-
already introduced the same changes; you might want to skip this patch."; echo
765+
already introduced the same changes; you might want to skip this patch."
769766
stop_here_user_resolve $this
770767
}
771768
unmerged=$(git ls-files -u)
772769
if test -n "$unmerged"
773770
then
774-
gettext "You still have unmerged paths in your index
775-
did you forget to use 'git add'?"; echo
771+
gettextln "You still have unmerged paths in your index
772+
did you forget to use 'git add'?"
776773
stop_here_user_resolve $this
777774
fi
778775
apply_status=0
@@ -797,7 +794,7 @@ did you forget to use 'git add'?"; echo
797794
fi
798795
if test $apply_status != 0
799796
then
800-
eval_gettext 'Patch failed at $msgnum $FIRSTLINE'; echo
797+
eval_gettextln 'Patch failed at $msgnum $FIRSTLINE'
801798
stop_here_user_resolve $this
802799
fi
803800

0 commit comments

Comments
 (0)