Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-07-23 01:04:02 +0300
committerJunio C Hamano <gitster@pobox.com>2022-07-23 01:04:02 +0300
commitdd7c820d9efef5b8c162fcd56d5e71fc393cd1b0 (patch)
tree77ae985e6bcd7d68c70b4b2c7e0006d01d742096
parent4483ea9a01d2a03641ce3c4e3723ea0bfeac705c (diff)
parentdf534dcbaafa74be9e922418712bede75676588b (diff)
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
-rw-r--r--builtin/shortlog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index 35825f075e..086dfee45a 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -443,7 +443,7 @@ void shortlog_output(struct shortlog *log)
struct strbuf sb = STRBUF_INIT;
if (log->sort_by_number)
- QSORT(log->list.items, log->list.nr,
+ STABLE_QSORT(log->list.items, log->list.nr,
log->summary ? compare_by_counter : compare_by_list);
for (i = 0; i < log->list.nr; i++) {
const struct string_list_item *item = &log->list.items[i];