submodule: take advantage of gettextln and eval_gettextln.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jon Seymour committed
Aug 7, 2011 at 21:58 UTC
6ff875c52ae48b8fe6a350df110e33aa2ba8afbc
1 file changed
+6
-12
git-submodule.sh
+6
-12
@@ -223,12 +223,9 @@ cmd_add()
223
224
if test -z "$force" && ! git add --dry-run --ignore-missing "$path" > /dev/null 2>&1
225
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:
227
\$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
229
exit 1
230
fi
231
@@ -237,7 +234,7 @@ Use -f if you really want to add it." &&
234
then
235
if test -d "$path"/.git -o -f "$path"/.git
236
then
240
- eval_gettext "Adding existing repo at '\$path' to the index"; echo
237
+ eval_gettextln "Adding existing repo at '\$path' to the index"
238
else
239
die "$(eval_gettext "'\$path' already exists and is not a valid git repo")"
240
fi
@@ -696,10 +693,7 @@ cmd_summary() {
693
;; # removed
694
*)
695
# unexpected type
699
- (
700
- eval_gettext "unexpected mode \$mod_dst" &&
701
- echo
702
- ) >&2
696
+ eval_gettextln "unexpected mode \$mod_dst" >&2
697
continue ;;
698
esac
699
fi
@@ -786,9 +780,9 @@ cmd_summary() {
780
done |
781
if test -n "$for_status"; then
782
if [ -n "$files" ]; then
789
- gettext "# Submodules changed but not updated:"; echo
783
+ gettextln "# Submodules changed but not updated:"
784
else
791
- gettext "# Submodule changes to be committed:"; echo
785
+ gettextln "# Submodule changes to be committed:"
786
fi
787
echo "#"
788
sed -e 's|^|# |' -e 's|^# $|#|'