Re: [PATCH 0/2] Use %as and %cs as pretty format flags
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:15
Jeff King [off-list ref] writes:
On Thu, Aug 28, 2008 at 07:10:45PM -0500, Nathan W. Panike wrote:quoted
The genesis of this patch was the documentation says that %ad represents 'author date' without any more specific information. I thought that I could do git show --date=short --pretty=format:"%ad %h" and get the date in short form---but alas, this did not work. So IRegardless of expansions to --pretty=format:, that is something we should probably be doing _anyway_. The current behavior is just confusing, and %ad is simply documented as "date", not in any particular format (and I think anyone relying on it _ignoring_ --date= is insane, since that --date is otherwise not doing anything). So how about this? -- >8 -- 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 <redacted>
Like the idea; haven't looked at the patch yet, though.