summaryrefslogtreecommitdiff
path: root/git-bisect.sh
diff options
context:
space:
mode:
authorVasco Almeida <vascomalmeida@sapo.pt>2016-06-17 20:21:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-06-17 22:45:48 (GMT)
commit57984dd9fc1d3c78826e41c7e7100af331758161 (patch)
treec098f53c0636382c87603b372621e05dc0be7d04 /git-bisect.sh
parentc36d8eee49cdf9c12ef66cfc3a780d3a1de3edd2 (diff)
downloadgit-57984dd9fc1d3c78826e41c7e7100af331758161.zip
git-57984dd9fc1d3c78826e41c7e7100af331758161.tar.gz
git-57984dd9fc1d3c78826e41c7e7100af331758161.tar.bz2
i18n: bisect: simplify error message for i18n
The message was not being extracted by xgettext, although it was marked for translation, seemingly because it contained a command substitution. Moreover, eval_gettext should be used instead of gettext for strings with substitution. See step 4. of section 15.5.2.1 Preparing Shell Scripts for Internationalization from gettext manual [1]: "Simplify translatable strings so that they don't contain command substitution ("`...`" or "$(...)") [...]" [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>
Diffstat (limited to 'git-bisect.sh')
-rwxr-xr-xgit-bisect.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index 5d1cb00..737bf05 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -277,8 +277,9 @@ bisect_state() {
0,*)
die "$(gettext "Please call 'bisect_state' with at least one argument.")" ;;
1,"$TERM_BAD"|1,"$TERM_GOOD"|1,skip)
- rev=$(git rev-parse --verify $(bisect_head)) ||
- die "$(gettext "Bad rev input: $(bisect_head)")"
+ bisected_head=$(bisect_head)
+ rev=$(git rev-parse --verify "$bisected_head") ||
+ die "$(eval_gettext "Bad rev input: \$bisected_head")"
bisect_write "$state" "$rev"
check_expected_revs "$rev" ;;
2,"$TERM_BAD"|*,"$TERM_GOOD"|*,skip)