Re: [RFC] GIT_WORK_TREE
- From
Sergio <sergio.callegari@gmail.com>
- Date
- Jun 3, 2007, 21:34 UTC
- Message-ID
- <loom.20070603T232437-414@post.gmane.org>
- In-Reply-To
- <20070603193203.GA24781@moooo.ath.cx>
Matthias Lederhofer <matled <at> gmx.net> writes:
> What I haven't thought through is if it could make sense to honor the > GIT_WORK_TREE/core.worktree setting when such a .git-repo file is used > or just use the directory containing the file as work tree.
I would do the first... for the following reason...
Suppose that by accident you move the working tree and you cd to some point in the moved WT... You issue a git command... By climbing up the directory hierarchy, git gets to the .git-repo file so now it knows where the repo is... But running a command and following the core.worktree config it might put output in the wrong output dir...
But actually I also see problems the other way round...
Suppose you have project A containing a dir B that is under its own git tracking... Also suppose that both A and B have repos separated from WT. If for some reason WT of B misses its .git-repo, then there is trouble on the way: when issuing a command in B, by climbing up git would find the .git-repo of A, thinking that it is the git-repo of B... A weird case, though.
Sergio