* [PATCH 2/2] Give %as and %cs meaning for pretty format
@ 2008-08-28 11:09 Nathan Panike
0 siblings, 0 replies; only message in thread
From: Nathan Panike @ 2008-08-28 11:09 UTC (permalink / raw)
To: git
After this patch, if one does, for example
git log -1 --pretty=format:"%as %h" e83c5163316f89bfb
one gets
2005-04-07 e83c516
and if one does
git log -1 --pretty=format:"%cs %h" e83c5163316f89bfb
one gets
2005-04-07 e83c516
Signed-off-by: Nathan W. Panike <nathan.panike@gmail.com>
---
pretty.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/pretty.c b/pretty.c
index 33ef34a..b1319a8 100644
--- a/pretty.c
+++ b/pretty.c
@@ -388,6 +388,9 @@ static size_t format_person_part(struct strbuf
*sb, char part,
case 'i': /* date, ISO 8601 */
strbuf_addstr(sb, show_date(date, tz, DATE_ISO8601));
return placeholder_len;
+ case 's': /* date, short */
+ strbuf_addstr(sb, show_date(date, tz, DATE_SHORT));
+ return placeholder_len;
}
skip:
--
1.6.0.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-28 11:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-28 11:09 [PATCH 2/2] Give %as and %cs meaning for pretty format Nathan Panike
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).