Re: [PATCH 5/8] work-trees are allowed inside a git-dir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Fri, 27 Jul 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:
> 
> >> Johannes Schindelin <Johannes.Schindelin@xxxxxx> 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

Ah!  But I have a really nice use case for that, too.  I track a 
.git/refs/exclude in one of my branches, because I do not want anybody 
else to have those excludes.  They only apply to me.

Another example would be a temporary checkout+change+checkin to some 
branch that is not currently checked out in the default working tree.  (I 
do that, too, and had to work around that by cloning with "-l -n -s")  
What I do there is to keep a checkout of some often-rsync'ed (actually 
wget'ed) state in the current working tree, automatically committing when 
upstream changes, and tracking upstream _releases_ in a different branch.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux