From: Junio C Hamano Date: Fri, 29 Aug 2008 01:08:00 GMT Subject: Re: [PATCH 0/2] Use %as and %cs as pretty format flags Message-ID: <7viqtkbpcf.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080829005458.GA4248@coredump.intra.peff.net> Jeff King writes: > On Thu, Aug 28, 2008 at 07:10:45PM -0500, Nathan W. Panike wrote: > >> 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 I > > Regardless 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 Like the idea; haven't looked at the patch yet, though.