summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Vasco Almeida <vascomalmeida@sapo.pt>2016-06-17 21:54:13 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-06-17 15:46:10 -0700
commitc87302bfe4ca0a861004eaa5e67f011446afea74 (patch)
tree206a9ddf73bb7541f7d6dba406564e09e6a571de
parenti18n: submodule: join strings marked for translation (diff)
downloadtgif-c87302bfe4ca0a861004eaa5e67f011446afea74.tar.xz
i18n: submodule: escape shell variables inside eval_gettext
According to the gettext manual [1], references to shell variables inside eval_gettext call must be escaped so that eval_gettext receives the translatable string before the variable values are substituted into it. [1] http://www.gnu.org/software/gettext/manual/html_node/Preparing-Shell-Scripts.html Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgit-submodule.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 5c7d251977..37c61f1652 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -647,7 +647,7 @@ cmd_update()
remote_name=$(sanitize_submodule_env; cd "$sm_path" && get_default_remote)
sha1=$(sanitize_submodule_env; cd "$sm_path" &&
git rev-parse --verify "${remote_name}/${branch}") ||
- die "$(eval_gettext "Unable to find current ${remote_name}/${branch} revision in submodule path '\$sm_path'")"
+ die "$(eval_gettext "Unable to find current \${remote_name}/\${branch} revision in submodule path '\$sm_path'")"
fi
if test "$subsha1" != "$sha1" || test -n "$force"
@@ -671,7 +671,7 @@ cmd_update()
# not be reachable from any of the refs
is_tip_reachable "$sm_path" "$sha1" ||
fetch_in_submodule "$sm_path" "$sha1" ||
- die "$(eval_gettext "Fetched in submodule path '\$displaypath', but it did not contain $sha1. Direct fetching of that commit failed.")"
+ die "$(eval_gettext "Fetched in submodule path '\$displaypath', but it did not contain \$sha1. Direct fetching of that commit failed.")"
fi
must_die_on_failure=