Re: type_size_sort

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Tuesday, December 6, 2005 - 2:45 pm

Morten Welinder <mwelinder@gmail.com> writes:


Then something like this?

---
diff --git a/pack-objects.c b/pack-objects.c
index a62c9f8..c27fee5 100644
--- a/pack-objects.c
+++ b/pack-objects.c
@@ -296,7 +296,7 @@ static int type_size_sort(const struct o
 		return -1;
 	if (a->size > b->size)
 		return 1;
-	return a < b ? -1 : (a > b);
+	return memcmp(a->sha1, b->sha1, 20);
 }
 
 struct unpacked {


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
type_size_sort, Morten Welinder, (Tue Dec 6, 2:19 pm)
Re: type_size_sort, Andreas Ericsson, (Tue Dec 6, 2:38 pm)
Re: type_size_sort, Junio C Hamano, (Tue Dec 6, 2:45 pm)
Re: type_size_sort, Junio C Hamano, (Tue Dec 6, 2:46 pm)
Re: type_size_sort, Morten Welinder, (Tue Dec 6, 5:51 pm)
Re: type_size_sort, Junio C Hamano, (Tue Dec 6, 7:28 pm)
Re: type_size_sort, Morten Welinder, (Tue Dec 6, 8:01 pm)