commit.c::print_summary: do not release the format string too early
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>
Junio C Hamano committed
Jan 17, 2010 at 00:57 UTC
fc6f19fe2b49928dcb4d2dfac88ca38a47d64cde
1 file changed
+1
-1
builtin-commit.c
+1
-1
@@ -1013,7 +1013,6 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
1013
rev.verbose_header = 1;
1014
rev.show_root_diff = 1;
1015
get_commit_format(format.buf, &rev);
1016
- strbuf_release(&format);
1016
rev.always_show_header = 0;
1017
rev.diffopt.detect_rename = 1;
1018
rev.diffopt.rename_limit = 100;
@@ -1036,6 +1035,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
1035
printf("%s\n", buf.buf);
1036
strbuf_release(&buf);
1037
}
1038
+ strbuf_release(&format);
1039
}
1040
1041
static int git_commit_config(const char *k, const char *v, void *cb)