[PATCH 08/15] ref_remove_duplicates(): improve documentation comment

2013-10-23 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu
---
 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

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 08/15] ref_remove_duplicates(): improve documentation comment

2013-10-23 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes:

 Signed-off-by: Michael Haggerty mhag...@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.

 ---
  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);
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html