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

Re: [PATCH] allow setting GIT_WORK_TREE to "no work tree"

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 6, 2008, 20:54 UTC
Message-ID
<7v4pclvmae.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080206110131.GA4167@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 21 quoted lines
> On Wed, Feb 06, 2008 at 11:42:15AM +0100, Johannes Sixt wrote:
>
>> > The special value is a blank GIT_WORK_TREE; it could be any
>> > value, but this should not conflict with any user values
>> > (and as a bonus, you can now tell git "I don't have a work
>> > tree" with "GIT_WORK_TREE= git", though I suspect the use
>> > case for that is limited).
>> 
>> Hrm. Unfortunately, on Windows there is no such thing as an empty
>> environment string. setenv(x, "") *removes* the environment variable.
>
> Bleh. Maybe "GIT_WORK_TREE=:"? It doesn't make sense by itself since we
> don't try to execute the contents of GIT_WORK_TREE, but it's unlikely to
> be used by a user, and I believe there was recent talk of making
> "GIT_EDITOR=:" work.
>
> The other option is setting
>
>   GIT_MAGICALLY_SET_GIT_DIR_SO_DONT_ACT_LIKE_THE_USER_DID=1
>
> but I was hoping to avoid that.
Yuck.  Let's then try your original (slightly redundant) one.
Previous: Jeff KingNext: Junio C Hamano
Message 4 of 13 in “allow setting GIT_WORK_TREE to "no work tree"”
  1. allow setting GIT_WORK_TREE to "no work tree"Jeff King, Feb 6, 2008
  2. Johannes SixtFeb 6, 2008
  3. Jeff KingFeb 6, 2008
  4. Junio C HamanoFeb 6, 2008
  5. Junio C HamanoFeb 6, 2008
  6. Jeff KingFeb 7, 2008
  7. Jay SoffianFeb 7, 2008
  8. Johannes SchindelinFeb 7, 2008
  9. Jay SoffianFeb 7, 2008
  10. Junio C HamanoFeb 7, 2008
  11. Johannes SchindelinFeb 7, 2008
  12. Johannes SixtFeb 8, 2008
  13. Johannes SchindelinFeb 8, 2008

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.