]> asedeno.scripts.mit.edu Git - git.git/blobdiff - builtin-for-each-ref.c
Merge branch 'jc/add-stop-at-symlink'
[git.git] / builtin-for-each-ref.c
index 76282ad79193e2a5f0ec2ba8e5027025f8a7bee1..4d25ec51d009bf18f95c60ca9ccd641ac5792db6 100644 (file)
@@ -459,8 +459,10 @@ static void find_subpos(const char *buf, unsigned long sz, const char **sub, con
                return;
        *sub = buf; /* first non-empty line */
        buf = strchr(buf, '\n');
-       if (!buf)
+       if (!buf) {
+               *body = "";
                return; /* no body */
+       }
        while (*buf == '\n')
                buf++; /* skip blank between subject and body */
        *body = buf;
@@ -809,7 +811,7 @@ static struct ref_sort *default_sort(void)
        return sort;
 }
 
-int opt_parse_sort(const struct option *opt, const char *arg, int unset)
+static int opt_parse_sort(const struct option *opt, const char *arg, int unset)
 {
        struct ref_sort **sort_tail = opt->value;
        struct ref_sort *s;