Re: [PATCH 3/3] builtin/checkout: DWIM with -f -b
- From
- Michel Lespinasse <walken@google.com>
- Date
- Jun 21, 2010, 02:58 UTC
- Message-ID
- <AANLkTildfbJvt15cObc52LvOQRvasL4WYsJq3126bBGd@mail.gmail.com>
- In-Reply-To
- <20100620211605.GA2559@sigill.intra.peff.net>
On Sun, Jun 20, 2010 at 2:16 PM, Jeff King <peff@peff.net> wrote:
Show 8 quoted lines
> I'm certainly sympathetic, but as I understand it, with this new patch > you are doing the equivalent of: > > git branch -f jch master > git checkout -f jch > > which is different than what you wrote above. For your workflow, I > doubt it matters, but it is potentially destructive.
I am frequently trying to do this as well, so I would love the checkout -f -b option.
However, I think that the desired behavior for checkout -f -b is that it should be equivalent to: git branch -f jch master git checkout jch (without the -f here)
rationale: git checkout -b normally preserves the index & the working tree; adding the -f flag to a command that would otherwise succeed should not change its behavior.
-- Michel "Walken" Lespinasse A program is never fully debugged until the last user dies.