Merge branch 'master' of https://github.com/Softcatala/git-po
[gitweb.git] / builtin / fmt-merge-msg.c
index ac84e99f3a6c073409ab7514aacdad7e722c6255..efab62fd85e314ccb6ec5becedead91823d03dde 100644 (file)
@@ -314,14 +314,10 @@ static void add_people_info(struct strbuf *out,
                            struct string_list *authors,
                            struct string_list *committers)
 {
-       if (authors->nr)
-               qsort(authors->items,
-                     authors->nr, sizeof(authors->items[0]),
-                     cmp_string_list_util_as_integral);
-       if (committers->nr)
-               qsort(committers->items,
-                     committers->nr, sizeof(committers->items[0]),
-                     cmp_string_list_util_as_integral);
+       QSORT(authors->items, authors->nr,
+             cmp_string_list_util_as_integral);
+       QSORT(committers->items, committers->nr,
+             cmp_string_list_util_as_integral);
 
        credit_people(out, authors, 'a');
        credit_people(out, committers, 'c');
@@ -395,7 +391,7 @@ static void shortlog(const char *name,
 
        for (i = 0; i < subjects.nr; i++)
                if (i >= limit)
-                       strbuf_addf(out, "  ...\n");
+                       strbuf_addstr(out, "  ...\n");
                else
                        strbuf_addf(out, "  %s\n", subjects.items[i].string);