path: root/commit.h
diff options
authorJeff King <>2008-08-29 00:54:59 (GMT)
committerJunio C Hamano <>2008-08-29 07:14:29 (GMT)
commitd36f8679e94c2a0d4d15d6adcea434634af6d627 (patch)
tree2627d520068c741d8235151da56ae66ad261ed01 /commit.h
parent0cfeed2e1d320cc76c434e0bfc26d90065754e46 (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'commit.h')
1 files changed, 2 insertions, 1 deletions
diff --git a/commit.h b/commit.h
index 77de962..ecdd573 100644
--- a/commit.h
+++ b/commit.h
@@ -67,7 +67,8 @@ extern int non_ascii(int);
struct rev_info; /* in revision.h, it circularly uses enum cmit_fmt */
extern void get_commit_format(const char *arg, struct rev_info *);
extern void format_commit_message(const struct commit *commit,
- const void *format, struct strbuf *sb);
+ const void *format, struct strbuf *sb,
+ enum date_mode dmode);
extern void pretty_print_commit(enum cmit_fmt fmt, const struct commit*,
struct strbuf *,
int abbrev, const char *subject,