From: Michael Haggerty Date: Wed, 23 Oct 2013 15:50:41 GMT Subject: [PATCH 08/15] ref_remove_duplicates(): improve documentation comment Message-ID: <1382543448-2586-9-git-send-email-mhagger@alum.mit.edu> In-Reply-To: <1382543448-2586-1-git-send-email-mhagger@alum.mit.edu> Signed-off-by: Michael Haggerty --- 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); -- 1.8.4