threads / discuss / 13077

git read-tree ignores GIT_WORK_TREE

Subject: git read-tree ignores GIT_WORK_TREE

## tl;dr

One message between Apr 12, 2008 and Apr 12, 2008.

replies: 0people: 1as markdown or json

Karl Hasselström· Apr 12, 2008, 14:29 UTC · lore

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

← back to recent threads