From 9148ea8a8ecd73720d450d30acc4bceec310ab3b Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Tue, 15 Nov 2016 20:28:32 -0800 Subject: [PATCH] Switch secondary sort order for version-sorted manifests To ease human readability of manifests, but without impacting manifest delta efficiency, use a lexicographic filename secondary sort order when sorting manifests by version. Below is an example of how this commit changes the sorted order (the first column is the version, and the second column is the filename). # Before 10 zyxw 10 abcd 20 test2 20 test1 20 abba 20 aaaa 30 zzyy # After 10 abcd 10 zyxw 20 aaaa 20 abba 20 test1 20 test2 30 zzyy Signed-off-by: Patrick McCarty --- src/manifest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manifest.c b/src/manifest.c index 57614b4..859a345 100644 --- a/src/manifest.c +++ b/src/manifest.c @@ -64,7 +64,7 @@ int file_sort_version(gconstpointer a, gconstpointer b) return 1; } - return strcmp(B->filename, A->filename); + return strcmp(A->filename, B->filename); } int file_sort_filename(gconstpointer a, gconstpointer b)