{"thread":{"id":"15259","subject":"[PATCH 2/2] Give %as and %cs meaning for pretty format","startedAt":"2008-08-28T11:09:46Z","lastAt":"2008-08-28T11:09:46Z","messageCount":1,"participants":["Nathan Panike"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"89007","messageId":"d77df1110808280409t561de23ay49741f7088ed1f58@mail.gmail.com","threadId":"15259","inReplyTo":null,"subject":"[PATCH 2/2] Give %as and %cs meaning for pretty format","fromName":"Nathan Panike","fromEmail":"nathan.panike@gmail.com","sentAt":"2008-08-28T11:09:46Z","receivedAt":"2008-08-28T11:09:46Z","isPatch":true,"sender":{"key":"nathan.panike@gmail.com","avatar":"https://avatars.githubusercontent.com/u/389447?v=4"},"body":"After this patch, if one does, for example\n\ngit log -1 --pretty=format:\"%as %h\" e83c5163316f89bfb\n\none gets\n\n2005-04-07 e83c516\n\nand if one does\n\ngit log -1 --pretty=format:\"%cs %h\" e83c5163316f89bfb\n\none gets\n\n2005-04-07 e83c516\n\nSigned-off-by: Nathan W. Panike <nathan.panike@gmail.com>\n---\n pretty.c |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/pretty.c b/pretty.c\nindex 33ef34a..b1319a8 100644\n--- a/pretty.c\n+++ b/pretty.c\n@@ -388,6 +388,9 @@ static size_t format_person_part(struct strbuf\n*sb, char part,\n        case 'i':       /* date, ISO 8601 */\n                strbuf_addstr(sb, show_date(date, tz, DATE_ISO8601));\n                return placeholder_len;\n+       case 's':       /* date, short */\n+               strbuf_addstr(sb, show_date(date, tz, DATE_SHORT));\n+               return placeholder_len;\n        }\n\n skip:\n-- \n1.6.0.1\n"}]}