git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/6] i18n win32: add git-pull eval_gettext variable prefix

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 25, 2011, 23:19 UTC
Message-ID
<1306365594-22061-4-git-send-email-avarab@gmail.com>
In-Reply-To
<1306365594-22061-1-git-send-email-avarab@gmail.com>

Change the eval_gettext() invocations to use the GIT_I18N_VARIABLE_ prefix for variables used in eval_gettext. On Windows environment variables are case insensitive, so e.g. $PATH clashes with $path. By using a sufficiently unique prefix we work around that issue.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 git-pull.sh |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/git-pull.sh b/git-pull.sh
index a10b129..d5f25a6 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -217,17 +217,18 @@ then
 	# $orig_head commit, but we are merging into $curr_head.
 	# First update the working tree to match $curr_head.
 
+	GIT_I18N_VARIABLE_orig_head=$orig_head
 	(
 		eval_gettext "Warning: fetch updated the current branch head.
 Warning: fast-forwarding your working tree from
-Warning: commit \$orig_head." &&
+Warning: commit \$GIT_I18N_VARIABLE_orig_head." &&
 		echo
 	) >&2
 	git update-index -q --refresh
 	git read-tree -u -m "$orig_head" "$curr_head" ||
 		die "$(eval_gettext "Cannot fast-forward your working tree.
 After making sure that you saved anything precious from
-$ git diff \$orig_head
+$ git diff \$GIT_I18N_VARIABLE_orig_head
 output, run
 $ git reset --hard
 to recover.")"
-- 
1.7.5.1
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 8 of 11 in “i18n: Windows shellscript support”
  1. 0/6 i18n: Windows shellscript supportÆvar Arnfjörð Bjarmason, May 25, 2011
  2. 1/6 i18n win32: add git-am eval_gettext variable prefixÆvar Arnfjörð Bjarmason, May 25, 2011
  3. Johannes SixtMay 26, 2011
  4. Junio C HamanoMay 26, 2011
  5. Johannes SixtMay 26, 2011
  6. Ævar Arnfjörð BjarmasonMay 26, 2011
  7. 2/6 i18n win32: add git-bisect eval_gettext variable prefixÆvar Arnfjörð Bjarmason, May 25, 2011
  8. 3/6 i18n win32: add git-pull eval_gettext variable prefixÆvar Arnfjörð Bjarmason, May 25, 2011
  9. 4/6 i18n win32: add git-stash eval_gettext variable prefixÆvar Arnfjörð Bjarmason, May 25, 2011
  10. 5/6 i18n win32: add git-submodule eval_gettext variable prefixÆvar Arnfjörð Bjarmason, May 25, 2011
  11. 6/6 i18n win32: add test eval_gettext variable prefixÆvar Arnfjörð Bjarmason, May 25, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.