diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-10-30 20:18:31 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-10-30 20:18:31 -0700 |
commit | 5f809ff50921bee44bbf88c49056e7d145c0c35f (patch) | |
tree | 451ba24442900b54c90264056998effaf25cd4eb /builtin-merge.c | |
parent | d39d667169fda640065d48b70288c3342bd3195d (diff) | |
parent | b7b10385a84c741a4fe219807c9511f69403640a (diff) | |
download | git-5f809ff50921bee44bbf88c49056e7d145c0c35f.tar.gz |
fixup tr/stash-format merge
Diffstat (limited to 'builtin-merge.c')
-rw-r--r-- | builtin-merge.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin-merge.c b/builtin-merge.c index b6b84286b2..c69a3051f3 100644 --- a/builtin-merge.c +++ b/builtin-merge.c @@ -264,6 +264,7 @@ static void squash_message(void) struct strbuf out = STRBUF_INIT; struct commit_list *j; int fd; + struct pretty_print_context ctx = {0}; printf("Squash commit -- not updating HEAD\n"); fd = open(git_path("SQUASH_MSG"), O_WRONLY | O_CREAT, 0666); @@ -285,13 +286,15 @@ static void squash_message(void) if (prepare_revision_walk(&rev)) die("revision walk setup failed"); + ctx.abbrev = rev.abbrev; + ctx.date_mode = rev.date_mode; + strbuf_addstr(&out, "Squashed commit of the following:\n"); while ((commit = get_revision(&rev)) != NULL) { strbuf_addch(&out, '\n'); strbuf_addf(&out, "commit %s\n", sha1_to_hex(commit->object.sha1)); - pretty_print_commit(rev.commit_format, commit, &out, rev.abbrev, - NULL, NULL, rev.date_mode, 0); + pretty_print_commit(rev.commit_format, commit, &out, &ctx); } if (write(fd, out.buf, out.len) < 0) die_errno("Writing SQUASH_MSG"); |