Re: [PATCH 5/8] work-trees are allowed inside a git-dir
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 28, 2007, 00:48 UTC
- Message-ID
- <7vabthwdyg.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.64.0707280122160.14781@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 18 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. > ... > 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
I understand the --git-dir=$HOME/x.git to keep track of something in $HOME/foo/bar example.
But that is not the issue you described in the original message. I was asking about this (which is the way I read your original message):
$ GIT_DIR=$HOME/x.git git init
$ mkdir $HOME/x.git/workroot
$ cd $HOME/x.git/workroot
$ git --git-dir=../ --work-tree=. That is, $HOME/x.git/ is the GIT_DIR that has HEAD, index and refs/, and you are keeping track of contents whose rootlevel is at $HOME/x.git/workroot