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

git read-tree ignores GIT_WORK_TREE

From
Karl Hasselström <kha@treskal.com>
Date
Apr 12, 2008, 14:29 UTC
Message-ID
<20080412142940.GA14214@diana.vm.bytemark.co.uk>

It seems that git merge-recursive recently started honoring GIT_WORK_TREE. This broke StGit, which was using both GIT_WORK_TREE=$(git rev-parse --show-cdup) _and_ cd $(git rev-parse --show-cdup) when execing git merge-recursive. (I'm not arguing with this change -- it's definitely a bug in StGit to use both.)

However, I was doing the same to read-tree -u -m, and that still works. It seems that read-tree is ignoring GIT_WORK_TREE. Is this intentional, and if so, what's the rule about when GIT_WORK_TREE is heeded and when it's ignored?

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Message 1 of 1 in “git read-tree ignores GIT_WORK_TREE”
  1. Karl HasselströmApr 12, 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.