aboutsummaryrefslogtreecommitdiff
path: root/builtin-commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-10-30 20:18:31 -0700
committerJunio C Hamano <gitster@pobox.com>2009-10-30 20:18:31 -0700
commit5f809ff50921bee44bbf88c49056e7d145c0c35f (patch)
tree451ba24442900b54c90264056998effaf25cd4eb /builtin-commit.c
parentd39d667169fda640065d48b70288c3342bd3195d (diff)
parentb7b10385a84c741a4fe219807c9511f69403640a (diff)
downloadgit-5f809ff50921bee44bbf88c49056e7d145c0c35f.tar.gz
git-5f809ff50921bee44bbf88c49056e7d145c0c35f.tar.xz
fixup tr/stash-format merge
Diffstat (limited to 'builtin-commit.c')
-rw-r--r--builtin-commit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/builtin-commit.c b/builtin-commit.c
index c395cbf14..beddf01dd 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -725,8 +725,10 @@ static const char *find_author_by_nickname(const char *name)
prepare_revision_walk(&revs);
commit = get_revision(&revs);
if (commit) {
+ struct pretty_print_context ctx = {0};
+ ctx.date_mode = DATE_NORMAL;
strbuf_release(&buf);
- format_commit_message(commit, "%an <%ae>", &buf, DATE_NORMAL);
+ format_commit_message(commit, "%an <%ae>", &buf, &ctx);
return strbuf_detach(&buf, NULL);
}
die("No existing author found with '%s'", name);
@@ -983,8 +985,10 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
initial_commit ? " (root-commit)" : "");
if (!log_tree_commit(&rev, commit)) {
+ struct pretty_print_context ctx = {0};
struct strbuf buf = STRBUF_INIT;
- format_commit_message(commit, format + 7, &buf, DATE_NORMAL);
+ ctx.date_mode = DATE_NORMAL;
+ format_commit_message(commit, format + 7, &buf, &ctx);
printf("%s\n", buf.buf);
strbuf_release(&buf);
}