On Thursday 2021-02-25 19:29, Junio C Hamano wrote:
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