git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Phil Hord <hordp@cisco.com>
Cc: git@vger.kernel.org, phil.hord@gmail.com,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCHv2] git-pull: Avoid merge-base on detached head
Date: Fri, 26 Oct 2012 08:48:10 -0400	[thread overview]
Message-ID: <20121026124810.GC1455@sigill.intra.peff.net> (raw)
In-Reply-To: <508989FD.7090101@cisco.com>

On Thu, Oct 25, 2012 at 02:50:37PM -0400, Phil Hord wrote:

> >> 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

      reply	other threads:[~2012-10-26 12:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-23 20:39 [PATCHv2] git-pull: Avoid merge-base on detached head Phil Hord
2012-10-23 20:39 ` Phil Hord
2012-10-25  9:34   ` Jeff King
2012-10-25 18:50     ` Phil Hord
2012-10-26 12:48       ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121026124810.GC1455@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hordp@cisco.com \
    --cc=phil.hord@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).