Re: [PATCH] Export GIT_DIR after setting it
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 15, 2008, 17:23 UTC
- Message-ID
- <7vlk2bh45u.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20080515101523.GA31719@lapse.madduck.net>
"martin f. krafft" <madduck@madduck.net> writes:
> The only problem I see now is when an external command (or the shell > script) can't properly deal with GIT_DIR being set, but then that's > a whole different bug.
One thing that we did not have to worry about when git-sh-setup was invented is GIT_WORK_TREE and its cousin core.worktree. When the user uses GIT_DIR _but_ wants to work from a subdirectory of the checked out work tree, the user _must_ tell git where the top of the work tree is; in other words, setting and exporting only GIT_DIR is a misconfiguration.
I have a suspicion that "the whole different bug" is what bit you -- perhaps some places need to also set and export GIT_WORK_TREE as well when the do GIT_DIR.