summaryrefslogtreecommitdiff
path: root/ref-filter.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-11-03 23:12:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-11-03 23:12:57 (GMT)
commit415095f05501bb17edcb86c6d9fd193753b30ea7 (patch)
treeef453673dd4ada7c2b0b355085d8c3086f619a3a /ref-filter.c
parent2635c2b8bfc9aec07b7f023d8e3b3d02df715344 (diff)
parent9e468334b41c1d1fc715de177ef1f61a36c1cf01 (diff)
downloadgit-415095f05501bb17edcb86c6d9fd193753b30ea7.zip
git-415095f05501bb17edcb86c6d9fd193753b30ea7.tar.gz
git-415095f05501bb17edcb86c6d9fd193753b30ea7.tar.bz2
Merge branch 'kn/for-each-branch'
Using the timestamp based criteria in "git branch --sort" did not tiebreak branches that point at commits with the same timestamp (or the same commit), making the resulting output unstable. * kn/for-each-branch: ref-filter: fallback on alphabetical comparison
Diffstat (limited to 'ref-filter.c')
-rw-r--r--ref-filter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ref-filter.c b/ref-filter.c
index 1194f10..e205dd2 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -1457,7 +1457,7 @@ static int cmp_ref_sorting(struct ref_sorting *s, struct ref_array_item *a, stru
if (va->ul < vb->ul)
cmp = -1;
else if (va->ul == vb->ul)
- cmp = 0;
+ cmp = strcmp(a->refname, b->refname);
else
cmp = 1;
}