fixup tr/stash-format merge

This commit is contained in:
Junio C Hamano
2009-10-30 20:18:31 -07:00
19 changed files with 192 additions and 79 deletions

View File

@ -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);
}