Skip to content

Commit dd7c820

Browse files
committed
Merge branch 'js/shortlog-sort-stably'
"git shortlog -n" relied on the underlying qsort() to be stable, which shouldn't have. Fixed. * js/shortlog-sort-stably: shortlog: use a stable sort
2 parents 4483ea9 + df534dc commit dd7c820

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/shortlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ void shortlog_output(struct shortlog *log)
443443
struct strbuf sb = STRBUF_INIT;
444444

445445
if (log->sort_by_number)
446-
QSORT(log->list.items, log->list.nr,
446+
STABLE_QSORT(log->list.items, log->list.nr,
447447
log->summary ? compare_by_counter : compare_by_list);
448448
for (i = 0; i < log->list.nr; i++) {
449449
const struct string_list_item *item = &log->list.items[i];

0 commit comments

Comments
 (0)