pretty=format: respect date format options
When running a command like: git log --pretty=format:%ad --date=short the date option was ignored. This patch causes it to use whatever format was specified by --date (or by --relative-date, etc), just as the non-user formats would do. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
0cfeed2e1d
commit
d36f8679e9
@ -882,7 +882,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
|
||||
|
||||
if (!log_tree_commit(&rev, commit)) {
|
||||
struct strbuf buf = STRBUF_INIT;
|
||||
format_commit_message(commit, "%h: %s", &buf);
|
||||
format_commit_message(commit, "%h: %s", &buf, DATE_NORMAL);
|
||||
printf("%s\n", buf.buf);
|
||||
strbuf_release(&buf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user