summaryrefslogtreecommitdiff
path: root/builtin-commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-01-17 00:57:51 -0800
committerJunio C Hamano <gitster@pobox.com>2010-01-17 00:57:51 -0800
commitfc6f19fe2b49928dcb4d2dfac88ca38a47d64cde (patch)
tree2b7c664a99df532dfc172f4a9fc38e731790984f /builtin-commit.c
parentb706fcfe93262e485976ed2bc648b779cc47981f (diff)
downloadgit-fc6f19fe2b49928dcb4d2dfac88ca38a47d64cde.tar.gz
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>
Diffstat (limited to 'builtin-commit.c')
-rw-r--r--builtin-commit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-commit.c b/builtin-commit.c
index a73a532f2f..7f61e87ebd 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -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;
@@ -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)