Re: [PATCHv4 0/3] fetch: Only call a new ref a "branch" if it's under refs/heads/.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 16, 2012 at 06:08:47PM -0400, marcnarc@xxxxxxxxxxx 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]