Re: [PATCH 08/21] remote: let guess_remote_head() optionally return all matches
- From
Jeff King <peff@peff.net>
- Date
- Feb 26, 2009, 14:40 UTC
- Message-ID
- <20090226144052.GB9693@coredump.intra.peff.net>
- In-Reply-To
- <20090226143729.GA9693@coredump.intra.peff.net>
On Thu, Feb 26, 2009 at 09:37:29AM -0500, Jeff King wrote:
Show 6 quoted lines
> 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