Re: [RFC/PATCH] Add multiple workdir support to branch/checkout
- From
Jay Soffian <jaysoffian@gmail.com>
- Date
- Oct 5, 2011, 20:50 UTC
- Message-ID
- <CAG+J_DynQ8U6T9YMsWstKF_Cf6CSCr8b8E4T=p5uyGPh28G=kA@mail.gmail.com>
- In-Reply-To
- <20111005200043.GA32732@inner.h.iocl.org>
On Wed, Oct 5, 2011 at 4:00 PM, Andreas Krey <a.krey@gmx.de> wrote:
> Hmm. You mean forcing the user to make a new branch *earlier* than at > commit time is better?
In my mind, we're trying to make new-workdir usable for non-advanced users. I think it's conceptually simplest to allow a branch to be checked out only once.
FWIW, I use a modified copy of new-workdir w/this usage:
git new-workdir <repo> <workdir> <ref> [<start>]
Which allows me to create a new branch and workdir checked out to the new branch in one shot. It refuses to create the <workdir> if <ref> resolves to a checked-out branch. (If I want to start detached I can do so with <ref>^0, but I rarely if ever do that.)
j.