Skip to content

Commit

Permalink
commit.c::print_summary: do not release the format string too early
Browse files Browse the repository at this point in the history
When we are showing a clean merge, log_tree_commit() won't show the header
and we would need the format string to format the commit summary ourselves.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Jan 17, 2010
1 parent b706fcf commit fc6f19f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,6 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
rev.verbose_header = 1;
rev.show_root_diff = 1;
get_commit_format(format.buf, &rev);
strbuf_release(&format);
rev.always_show_header = 0;
rev.diffopt.detect_rename = 1;
rev.diffopt.rename_limit = 100;
Expand All @@ -1036,6 +1035,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
printf("%s\n", buf.buf);
strbuf_release(&buf);
}
strbuf_release(&format);
}

static int git_commit_config(const char *k, const char *v, void *cb)
Expand Down

0 comments on commit fc6f19f

Please sign in to comment.