for-each-ref: rename 'refinfo' to 'ref_array_item'
[gitweb.git] / builtin / shortlog.c
index c226f767aa9b0e5633a3d5dde7b0b969fec39c7f..c0bab6aaa9755f5a0264601defd0414b0b458e17 100644 (file)
@@ -10,7 +10,7 @@
 #include "parse-options.h"
 
 static char const * const shortlog_usage[] = {
-       N_("git shortlog [<options>] [<revision range>] [[--] [<path>...]]"),
+       N_("git shortlog [<options>] [<revision-range>] [[--] [<path>...]]"),
        NULL
 };
 
@@ -65,7 +65,7 @@ static void insert_one_record(struct shortlog *log,
        eol = strchr(oneline, '\n');
        if (!eol)
                eol = oneline + strlen(oneline);
-       if (!prefixcmp(oneline, "[PATCH")) {
+       if (starts_with(oneline, "[PATCH")) {
                char *eob = strchr(oneline, ']');
                if (eob && (!eol || eob < eol))
                        oneline = eob + 1;
@@ -95,7 +95,7 @@ static void read_from_stdin(struct shortlog *log)
 
        while (fgets(author, sizeof(author), stdin) != NULL) {
                if (!(author[0] == 'A' || author[0] == 'a') ||
-                   prefixcmp(author + 1, "uthor: "))
+                   !starts_with(author + 1, "uthor: "))
                        continue;
                while (fgets(oneline, sizeof(oneline), stdin) &&
                       oneline[0] != '\n')
@@ -123,7 +123,7 @@ void shortlog_add_commit(struct shortlog *log, struct commit *commit)
                else
                        eol++;
 
-               if (!prefixcmp(buffer, "author "))
+               if (starts_with(buffer, "author "))
                        author = buffer + 7;
                buffer = eol;
        }