Re: Multiple working trees with GIT ?
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 24, 2008, 11:04 UTC
- Message-ID
- <alpine.LSU.1.00.0801241102260.5731@racer.site>
- In-Reply-To
- <Pine.LNX.4.64.0801240947230.14173@reaper.quantumfyre.co.uk>
Hi,
On Thu, 24 Jan 2008, Julian Phillips wrote:
Show 5 quoted lines
> You might want to have a look at the git-new-workdir script in contrib, > it does basically the same thing. It's been there for about 10 months > now. It was based on an email from Junio: > > http://article.gmane.org/gmane.comp.version-control.git/41513/
FWIW I have a patch to do something like that in "git branch" itself.
Show 5 quoted lines
> However, there are some caveats about using this approach, basically > about the fact that there is nothing stopping you from updating refs > that are currently checked out in another directory and causing yourself > all sorts of pain ... the topic has cropped up a couple of times on the > list since the script was added.
I agree; maybe we should have a telltale file "refs/heads/<bla>.checkedout" which is heeded by "git checkout" and "git branch -d/-D", as well as update_ref() (should only update that ref when it HEAD points to it)?
Ciao, Dscho