Re: [PATCHv4 0/3] fetch: Only call a new ref a "branch" if it's under refs/heads/.
- From
Jeff King <peff@peff.net>
- Date
- Apr 17, 2012, 22:29 UTC
- Message-ID
- <20120417222959.GD10797@sigill.intra.peff.net>
- In-Reply-To
- <1334614130-31826-1-git-send-email-marcnarc@xiplink.com>
On Mon, Apr 16, 2012 at 06:08:47PM -0400, marcnarc@xiplink.com wrote:
> > It turns out that ref->peer_ref is always NULL in update_local_ref(). So I > made its caller pass in the full remote ref as a new parameter. I also added > a unit test.
Hrm. So yeah, it is because the "struct ref" we create is not from the ref_map, but is a newly created ref based on the local side (and I had my refs backwards before; the remote ref is the "real" ref, and the local version is found in peer_ref, not the other way around).
But I couldn't help but notice that store_updated_refs already has this exact same "what do we call it to the user" logic in it, which is what goes into FETCH_HEAD. Shouldn't we just be passing this "kind" flag down to update_local_ref, and then this copy of the logic can go away entirely?
-Peff