git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jens Lehmann <Jens.Lehmann@web.de>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] is_submodule_modified(): clear environment properly
Date: Wed, 24 Feb 2010 07:43:28 +0100	[thread overview]
Message-ID: <cb7bb73a1002232243w2f5f63bcw45662bb80cb9e52@mail.gmail.com> (raw)
In-Reply-To: <7veikbjokw.fsf@alter.siamese.dyndns.org>

On Wed, Feb 24, 2010 at 4:32 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:
>
>> On Tue, Feb 23, 2010 at 10:47 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
>>> Only GIT_INDEX_FILE was cleared until now, but other environment variables
>>> have to be cleared too before running git status in a submodule.
>>>
>> Of course this third use-case has a difference in that GIT_DIR is
>> actually set to something else and not just cleared, but this
>> particular case could just deep-copy the array modifying the
>> appropriate entry.
>
> Something like this, I guess.
>
> It is a bit frustrating that local_repo_env[] is a NULL terminated array
> and we cannot use ARRAY_SIZE(local_repo_env) as a compile-time constant.

I have a very simple solution for this, coming in the next revision of
my patchset, together with the environment.c move

-- 
Giuseppe "Oblomov" Bilotta

      reply	other threads:[~2010-02-24  6:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23 21:47 [PATCH] is_submodule_modified(): clear environment properly Jens Lehmann
2010-02-23 22:13 ` Giuseppe Bilotta
2010-02-24  3:32   ` Junio C Hamano
2010-02-24  6:43     ` Giuseppe Bilotta [this message]

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=cb7bb73a1002232243w2f5f63bcw45662bb80cb9e52@mail.gmail.com \
    --to=giuseppe.bilotta@gmail.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).