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

Re: [PATCH 1/6] i18n win32: add git-am eval_gettext variable prefix

From
Johannes Sixt <j.sixt@viscovery.net>
Date
May 26, 2011, 14:59 UTC
Message-ID
<4DDE6AC9.9090003@viscovery.net>
In-Reply-To
<7vlixtzh1q.fsf@alter.siamese.dyndns.org>
Am 5/26/2011 16:13, schrieb Junio C Hamano:
Show 12 quoted lines
> This started on windows that confuses between $path and $PATH, we wouldn't
> be doing this, right?  In git-submodule.sh uses $path variable for
> something other than the search-path, and the definition updated by you
> would become in the larger picture:
> 
> 	path=... ;# git-submodule uses the variable for not-a-search-path
>         _I18N__path=$path
>         export _I18N__path
>         git sh-i18n--envsubst "... $_I18N__path"
> 
> Is the RHS of the second assignment safe on Windows?  Are environment
> variables case insane but normal variables are safe?

Yes, the second assignment is safe, because at this point everything is internal to bash; it does the right thing.

Problems start only when exported variables are transported from bash to another process.

But ... wait a minute - I've another idea!
bash -c "path=z env"
*does* list both 'path' and 'PATH'
... hack hack ...

and so does a home-grown equivalent of 'env', both for MinGW and Visual Studio. It looks like the environment was transfered just fine, only the *lookup* by getenv() was case-insensitive. This means we would just have to supply a POSIX conformant getenv() for sh-i18n--envsubst.

I can write one, no problem; and, Ævar, I'm awfully sorry for sending you in the wrong direction.

-- Hannes
Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 5 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.