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

Re: bug: setting GIT_DIR to $(git rev-parse --git-dir) changes behavior

From
MNMartin Nicolay <m.nicolay@osm-ag.de>
Date
Feb 26, 2021, 07:54 UTC
Message-ID
<alpine.LSU.2.20.2102260846280.20742@cpza.bfz-tzou.qr>
On Thursday 2021-02-25 19:29, Junio C Hamano wrote:
Show 7 quoted lines
> The root of the working tree is at /tmp/t/, the repository at
> /tmp/t/.git/, and you are in the foo/ subdirectory.  When you ask
> "where is the top level of the working tree in this state, because
> you do not have GIT_DIR or GIT_WORK_TREE environment variables, you
> are asking Git to "discover" both the .git/ directory and the top of
> the working tree, by starting at the current directory,
> i.e. /tmp/t/foo, which is where you are.

*facepalm* The part about GIT_DIR setting the work-tree in addition to the repository I hadn't read. How embarrasing.

I apoligize for my bad reading skills and wasting you time.

Thanks Martin

Next: Junio C Hamano
Message 1 of 2 in “Re: bug: setting GIT_DIR to $(git rev-parse --git-dir) changes behavior”
  1. Martin NicolayFeb 26, 2021
  2. Junio C HamanoFeb 27, 2021

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.