Re: [PATCHv2] git-pull: Avoid merge-base on detached head
- From
Jeff King <peff@peff.net>
- Date
- Oct 26, 2012, 12:48 UTC
- Message-ID
- <20121026124810.GC1455@sigill.intra.peff.net>
- In-Reply-To
- <508989FD.7090101@cisco.com>
On Thu, Oct 25, 2012 at 02:50:37PM -0400, Phil Hord wrote:
Show 16 quoted lines
> >> git pull --rebase does some clever tricks to find the base > >> for $upstream , but it forgets that we may not have any > >> branch at all. When this happens, git merge-base reports its > >> "usage" help in the middle of an otherwise successful > >> rebase operation, because git-merge is called with one too > >> few parameters. > >> > >> Since we do not need the merge-base trick in the case of a > >> detached HEAD, detect this condition and bypass the clever > >> trick and the usage noise. > > Makes sense. I notice there is no test with your patch. It sounds from > > the description like the operation still may succeed, but we just get > > cruft on stderr? > > > > Yes, that's correct.
OK. I'd rather not worry about a test then, as it would necessarily be flaky with respect to what git-pull might generate on its stderr. I've queued your patch in 'next'.
Thanks.
-Peff