Re: [PATCH 08/15] ref_remove_duplicates(): improve documentation comment
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 23, 2013, 18:47 UTC
- Message-ID
- <xmqqsivrq0xq.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1382543448-2586-9-git-send-email-mhagger@alum.mit.edu>
Michael Haggerty <mhagger@alum.mit.edu> writes:
> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Up to this point the patches all look very sensible (modulo minor nits I sent separately). Will come back to the rest of the topics later.
Thanks.
Show 23 quoted lines
> --- > remote.h | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/remote.h b/remote.h > index 131130a..40293c0 100644 > --- a/remote.h > +++ b/remote.h > @@ -149,7 +149,14 @@ int resolve_remote_symref(struct ref *ref, struct ref *list); > int ref_newer(const unsigned char *new_sha1, const unsigned char *old_sha1); > > /* > - * Removes and frees any duplicate refs in the map. > + * Remove and free all but the first of any entries in the input list > + * that map the same remote reference to the same local reference. If > + * there are two entries that map different remote references to the > + * same local reference, die. > + * > + * Note that the first entry is never removed; therefore, the pointer > + * passed in as argument still points to the head of the list after > + * the function returns. > */ > void ref_remove_duplicates(struct ref *ref_map);