From: Jeff King Date: Mon, 17 Oct 2011 17:10:41 GMT Subject: Re: What should "git fetch origin +next" should do? Message-ID: <20111017171041.GA12837@sigill.intra.peff.net> In-Reply-To: <7v7h45s8rh.fsf@alter.siamese.dyndns.org> On Sun, Oct 16, 2011 at 12:20:02AM -0700, Junio C Hamano wrote: > I just tried to update one of them with "git pull --ff-only", and after > seeing that the fetch phase failed with non-ff on 'next', ran > > $ git fetch origin +next > > which happily copied the tip of updated next to FETCH_HEAD and nowhere > else. Of course, a colon-less refspec means do not store it anywhere, > i.e. "" === ":", so prefixing it > with '+' to force would logically be a no-op. But it nevertheless was > somewhat surprising and irritating. I don't see that this has anything to do with the "+" at all. If I said: $ git fetch origin next I think the exact same confusion exists. I told git to update 'next' from origin, but it didn't touch refs/remotes/origin/next. You and I both know what is happening, because we understand that "next" is a refspec, and that it has no RHS. But I suspect that is not how many git users think of it. We've discussed this before, of course: http://thread.gmane.org/gmane.comp.version-control.git/127163/focus=127215 -Peff