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

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

From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date
Feb 23, 2010, 22:13 UTC
Message-ID
<cb7bb73a1002231413n3a38e344hce8188671763c17b@mail.gmail.com>
In-Reply-To
<4B844D07.8070406@web.de>
On Tue, Feb 23, 2010 at 10:47 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
Show 13 quoted lines
> 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@web.de>
> ---
>
>
> 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
Previous: Jens LehmannNext: Junio C Hamano
Message 2 of 4 in “is_submodule_modified(): clear environment properly”
  1. is_submodule_modified(): clear environment properlyJens Lehmann, Feb 23, 2010
  2. Giuseppe BilottaFeb 23, 2010
  3. Junio C HamanoFeb 24, 2010
  4. Giuseppe BilottaFeb 24, 2010

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.