Re: [RFC/PATCH] Add multiple workdir support to branch/checkout
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Oct 5, 2011, 21:30 UTC
- Message-ID
- <20111005213002.GA12667@elie>
- In-Reply-To
- <CAG+J_DynQ8U6T9YMsWstKF_Cf6CSCr8b8E4T=p5uyGPh28G=kA@mail.gmail.com>
Jay Soffian wrote:
> In my mind, we're trying to make new-workdir usable for non-advanced > users.
I'd be happy already with making it comfortable for the advanced users. :)
I think your patch goes in a right direction (using the shared .git/config file as a way to negotiate ownership of branches). Junio’s comments about it seeming sensible to
- make this apply to other operations that clobber a branch - make the “[branch "master"] checkedout” configuration multi-valued if there is to be support for "git checkout -f" overriding this at all
ring true to me. Making the value of this variable the path to the .git dir or worktree (rather than an opaque string) seems like a very good thing: it means that a future git could check if the directory still exists and break the lock if someone has used “rm -fr”.
As for moving “git new-workdir” out of contrib, I believe another prerequisite is sharing the HEAD reflog.
Just my two cents, Jonathan