Thread (33 messages) flat view 33 messages, 3 authors, 2016-06-15

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

From: Jeff King <hidden>
Date: 2016-06-15 22:46:17

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help