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:59 UTC
Message-ID
<7vwsphu7gr.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7v4pclvmae.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 7 quoted lines
>> 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.
Oops, scratch that.  I was confused.

I do not like the magic GIT_WORK_TREE=: which is simply illogical. GIT_EDITOR=: made perfect sense (":" is actually a command that succeeds without doing anything), but ":" does not have anything to do with "there is no such path".

I was tempted to suggest GIT_WORK_TREE=/dev/null because that is what "diff" uses to mark "this does not even exist", but that feels dirty.

Previous: Junio C HamanoNext: Jeff King
Message 5 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.