Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 10/14] is_dup_ref(): extract function from sort_ref_list()

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:15

mhagger@alum.mit.edu writes:
quoted hunk
...
@@ -94,15 +113,11 @@ static void sort_ref_array(struct ref_array *array)
 
 	qsort(array->refs, array->nr, sizeof(*array->refs), ref_entry_cmp);
 
-	/* Remove any duplicates from the ref_array */
+	/* Remove any duplicates from the ref_list */
Eh... Also needs retitled.
 	for (; j < array->nr; j++) {
 		struct ref_entry *a = array->refs[i];
 		struct ref_entry *b = array->refs[j];
-		if (!strcmp(a->name, b->name)) {
-			if (hashcmp(a->sha1, b->sha1))
-				die("Duplicated ref, and SHA1s don't match: %s",
-				    a->name);
-			warning("Duplicated ref: %s", a->name);
+		if (is_dup_ref(a, b)) {
 			free(b);
 			continue;
 		}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help