fall back to comparison by name when refs have the same timestamp This fixes an issue where some references were missing from lists of references sorted by timestamp.
diff --git a/lib/reference.c b/lib/reference.c
index f1b5c18..eff4b9a 100644
--- a/lib/reference.c
+++ b/lib/reference.c
@@ -838,6 +838,8 @@ got_ref_cmp_by_commit_timestamp_descending(void *arg, int *cmp,
*cmp = 1;
else if (ref2->committer_time < ref1->committer_time)
*cmp = -1;
+ else
+ return got_ref_cmp_by_name(arg, cmp, ref1, ref2);
return err;
}