Re: [PATCH 08/21] remote: let guess_remote_head() optionally return all matches

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

 



On Thu, Feb 26, 2009 at 09:37:29AM -0500, Jeff King wrote:

> Hmm. This should probably be:
> 
>   dst->peer_ref = src->peer_ref ? copy_ref(src->peer_ref) : NULL;
> 
> (or copy_ref should return NULL when given NULL). I also wonder if the
> copied ref's peer_ref should be explicitly NULL'd.

BTW, all of my "probably" and "I wonder" here are because I think the
"peer ref" pointer is a little vague as a concept. E.g., I think in most
cases src->peer_ref->peer_ref != src.

Rather than having ref structs with "next" and "peer" pointers, I think
a more natural data structure would be a list (or array) of "ref pairs".

But you didn't create that with this series, and I don't think it is
worth the major surgery to change it now.

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

  Powered by Linux