Re: [PATCH 5/8] work-trees are allowed inside a git-dir
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 28, 2007, 00:38 UTC
- Message-ID
- <Pine.LNX.4.64.0707280122160.14781@racer.site>
- In-Reply-To
- <7vejity3h8.fsf@assigned-by-dhcp.cox.net>
Hi,
On Fri, 27 Jul 2007, Junio C Hamano wrote:
Show 19 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > > It is allowed to call > > > > $ git --git-dir=../ --work-tree=. bla > > > > when you really want to. In this case, you are both in the git directory > > and in the working tree. > > > > The earlier handling of this situation was seriously bogus. For regular > > working tree operations, it checked if inside git dir. That makes no > > sense, of course, since the check should be for a work tree, and nothing > > else. > > > > Fix that. > > I do not doubt this patch makes the above command line to work > better, but I have to wonder how that layout is useful. Care to > give a use case or two in the commit log message?
In the commit log message? Better somewhere else. Only git developers read the commit message.
But yes, I can point to a use case. AFAIR Martin Krafft brought up the issue to track different components of the home directory in different repositories.
I have a similar scenario here, which does not involve a home directory, but rather a directory where I should not put anything into (I could, but if the admin was anything akin to competent, I could not).
There are files in that directory (and all of its subdirectories) of a certain type, which are the only ones which are human generated, and therefore precious. I like to add them, and inspect them, with
git --git-dir=$HOME/x.git add
and
git --git-dir=$HOME/x.git diff
Another similar scenario is a network drive on Losedows, where the locking always fails. So I do not _want_ a repo there, even if I _could_.
Ciao, Dscho