{"thread":{"id":"55218","subject":"Re: bug: setting GIT_DIR to $(git rev-parse --git-dir) changes behavior","startedAt":"2021-02-26T07:56:56Z","lastAt":"2021-02-27T21:07:29Z","messageCount":2,"participants":["Martin Nicolay","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"417881","messageId":"alpine.LSU.2.20.2102260846280.20742@cpza.bfz-tzou.qr","threadId":"55218","inReplyTo":null,"subject":"Re: bug: setting GIT_DIR to $(git rev-parse --git-dir) changes behavior","fromName":"Martin Nicolay","fromEmail":"m.nicolay@osm-ag.de","sentAt":"2021-02-26T07:54:59Z","receivedAt":"2021-02-26T07:56:56Z","isPatch":false,"sender":{"key":"m.nicolay@osm-ag.de","avatar":null},"body":"On Thursday 2021-02-25 19:29, Junio C Hamano wrote:\n> The root of the working tree is at /tmp/t/, the repository at\n> /tmp/t/.git/, and you are in the foo/ subdirectory.  When you ask\n> \"where is the top level of the working tree in this state, because\n> you do not have GIT_DIR or GIT_WORK_TREE environment variables, you\n> are asking Git to \"discover\" both the .git/ directory and the top of\n> the working tree, by starting at the current directory,\n> i.e. /tmp/t/foo, which is where you are.\n\n*facepalm* The part about GIT_DIR setting the work-tree in addition to \nthe repository I hadn't read. How embarrasing.\n\nI apoligize for my bad reading skills and wasting you time.\n\nThanks\nMartin\n"},{"id":"417952","messageId":"xmqq35xhte3n.fsf@gitster.c.googlers.com","threadId":"55218","inReplyTo":"alpine.LSU.2.20.2102260846280.20742@cpza.bfz-tzou.qr","subject":"Re: bug: setting GIT_DIR to $(git rev-parse --git-dir) changes behavior","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-02-27T21:06:36Z","receivedAt":"2021-02-27T21:07:29Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Nicolay <m.nicolay@osm-ag.de> writes:\n\n> On Thursday 2021-02-25 19:29, Junio C Hamano wrote:\n>> The root of the working tree is at /tmp/t/, the repository at\n>> /tmp/t/.git/, and you are in the foo/ subdirectory.  When you ask\n>> \"where is the top level of the working tree in this state, because\n>> you do not have GIT_DIR or GIT_WORK_TREE environment variables, you\n>> are asking Git to \"discover\" both the .git/ directory and the top of\n>> the working tree, by starting at the current directory,\n>> i.e. /tmp/t/foo, which is where you are.\n>\n> *facepalm* The part about GIT_DIR setting the work-tree in addition to\n>  the repository I hadn't read. How embarrasing.\n>\n> I apoligize for my bad reading skills and wasting you time.\n\nWe would love to hear observations on which part of the\ndocumentation was misleading and suggestions on how to make it\nharder to misinterpret it.\n\nNo need to apologize, and thanks for reporting.\n"}]}