Re: [PATCHv2] fetch: Only call a new ref a "branch" if it's under refs/heads/.
- From
Jeff King <peff@peff.net>
- Date
- Apr 16, 2012, 15:00 UTC
- Message-ID
- <20120416150036.GA15009@sigill.intra.peff.net>
- In-Reply-To
- <4F8C338D.1050805@xiplink.com>
On Mon, Apr 16, 2012 at 10:58:21AM -0400, Marc Branchaud wrote:
> Git is better off describing what's appeared in the remote repo, and not > worrying about describing how the user might've mapped those things to local > refs.
That's my preference, as well, so it sounds like you, Junio, and I are all in agreement.
> (That said, patching fetch.c to do that is a bit beyond me at the moment. > Where would I find the remote's name for the ref?)
During transfer operations, the remote side of the pair is generally pointed to by the peer_ref member of "struct ref" (so just use "ref->peer_ref->name" instead of "ref->name").
-Peff