diff options
Diffstat (limited to 'pretty.c')
-rw-r--r-- | pretty.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -1556,12 +1556,7 @@ static void pp_header(struct pretty_print_context *pp, } if (!parents_shown) { - struct commit_list *parent; - int num; - for (parent = commit->parents, num = 0; - parent; - parent = parent->next, num++) - ; + unsigned num = commit_list_count(commit->parents); /* with enough slop */ strbuf_grow(sb, num * 50 + 20); add_merge_info(pp, sb, commit); |