Skip to content

Commit 6ff875c

Browse files
jonseymourgitster
authored andcommitted
submodule: take advantage of gettextln and eval_gettextln.
Signed-off-by: Jon Seymour <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6fdd50e commit 6ff875c

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

git-submodule.sh

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,9 @@ cmd_add()
223223

224224
if test -z "$force" && ! git add --dry-run --ignore-missing "$path" > /dev/null 2>&1
225225
then
226-
(
227-
eval_gettext "The following path is ignored by one of your .gitignore files:
226+
eval_gettextln "The following path is ignored by one of your .gitignore files:
228227
\$path
229-
Use -f if you really want to add it." &&
230-
echo
231-
) >&2
228+
Use -f if you really want to add it." >&2
232229
exit 1
233230
fi
234231

@@ -237,7 +234,7 @@ Use -f if you really want to add it." &&
237234
then
238235
if test -d "$path"/.git -o -f "$path"/.git
239236
then
240-
eval_gettext "Adding existing repo at '\$path' to the index"; echo
237+
eval_gettextln "Adding existing repo at '\$path' to the index"
241238
else
242239
die "$(eval_gettext "'\$path' already exists and is not a valid git repo")"
243240
fi
@@ -696,10 +693,7 @@ cmd_summary() {
696693
;; # removed
697694
*)
698695
# unexpected type
699-
(
700-
eval_gettext "unexpected mode \$mod_dst" &&
701-
echo
702-
) >&2
696+
eval_gettextln "unexpected mode \$mod_dst" >&2
703697
continue ;;
704698
esac
705699
fi
@@ -786,9 +780,9 @@ cmd_summary() {
786780
done |
787781
if test -n "$for_status"; then
788782
if [ -n "$files" ]; then
789-
gettext "# Submodules changed but not updated:"; echo
783+
gettextln "# Submodules changed but not updated:"
790784
else
791-
gettext "# Submodule changes to be committed:"; echo
785+
gettextln "# Submodule changes to be committed:"
792786
fi
793787
echo "#"
794788
sed -e 's|^|# |' -e 's|^# $|#|'

0 commit comments

Comments
 (0)