Re: [PATCH] is_submodule_modified(): clear environment properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 23, 2010 at 10:47 PM, Jens Lehmann <Jens.Lehmann@xxxxxx> 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.
>
> And while at it, don't allocate a new strbuf for GIT_INDEX_FILE but use
> a string constant instead.
>
> Signed-off-by: Jens Lehmann <Jens.Lehmann@xxxxxx>
> ---
>
>
> I think it makes sense to clear the same environment variables here
> as Giuseppe Bilotta's patch did for the git shell commands, even
> though i am not aware of any bug reports yet.

I think this makes sense. This would be the third user of the "list of
repo-local vars", together with the shell function and the connect.c
code highlighted elsewhere, so I believe this really puts some more
pressure on a refactoring of the list generation. Maybe a static array
exportable via git-rev-parse?

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.

-- 
Giuseppe "Oblomov" Bilotta
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]