All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	git@vger.kernel.org, "Jonathan Nieder" <jrnieder@gmail.com>
Subject: Re: [PATCH 1/6] i18n win32: add git-am eval_gettext variable prefix
Date: Thu, 26 May 2011 16:59:21 +0200	[thread overview]
Message-ID: <4DDE6AC9.9090003@viscovery.net> (raw)
In-Reply-To: <7vlixtzh1q.fsf@alter.siamese.dyndns.org>

Am 5/26/2011 16:13, schrieb Junio C Hamano:
> 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

  reply	other threads:[~2011-05-26 14:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-25 23:19 [PATCH 0/6] i18n: Windows shellscript support Ævar Arnfjörð Bjarmason
2011-05-25 23:19 ` [PATCH 1/6] i18n win32: add git-am eval_gettext variable prefix Ævar Arnfjörð Bjarmason
2011-05-26  6:34   ` Johannes Sixt
2011-05-26 14:13     ` Junio C Hamano
2011-05-26 14:59       ` Johannes Sixt [this message]
2011-05-26 15:16         ` Ævar Arnfjörð Bjarmason
2011-05-25 23:19 ` [PATCH 2/6] i18n win32: add git-bisect " Ævar Arnfjörð Bjarmason
2011-05-25 23:19 ` [PATCH 3/6] i18n win32: add git-pull " Ævar Arnfjörð Bjarmason
2011-05-25 23:19 ` [PATCH 4/6] i18n win32: add git-stash " Ævar Arnfjörð Bjarmason
2011-05-25 23:19 ` [PATCH 5/6] i18n win32: add git-submodule " Ævar Arnfjörð Bjarmason
2011-05-25 23:19 ` [PATCH 6/6] i18n win32: add test " Ævar Arnfjörð Bjarmason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DDE6AC9.9090003@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.