git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/2] Use %as and %cs as pretty format flags

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 29, 2008, 01:08 UTC
Message-ID
<7viqtkbpcf.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080829005458.GA4248@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 31 quoted lines
> 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 <peff@peff.net>
Like the idea; haven't looked at the patch yet, though.
Previous: Jeff KingNext: Jakub Narebski
Message 7 of 9 in “Use %as and %cs as pretty format flags”
  1. 0/2 Use %as and %cs as pretty format flagsNathan Panike, Aug 28, 2008
  2. Jeff KingAug 28, 2008
  3. Junio C HamanoAug 28, 2008
  4. Jeff KingAug 28, 2008
  5. Nathan W. PanikeAug 29, 2008
  6. Jeff KingAug 29, 2008
  7. Junio C HamanoAug 29, 2008
  8. Jakub NarebskiAug 29, 2008
  9. Avery PennarunAug 29, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.