From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "Nathan W. Panike" <nathan.panike@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH 0/2] Use %as and %cs as pretty format flags
Date: Thu, 28 Aug 2008 18:08:00 -0700 [thread overview]
Message-ID: <7viqtkbpcf.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080829005458.GA4248@coredump.intra.peff.net> (Jeff King's message of "Thu, 28 Aug 2008 20:54:59 -0400")
Jeff King <peff@peff.net> 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 <peff@peff.net>
Like the idea; haven't looked at the patch yet, though.
next prev parent reply other threads:[~2008-08-29 1:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-28 11:09 [PATCH 0/2] Use %as and %cs as pretty format flags Nathan Panike
2008-08-28 23:15 ` Jeff King
2008-08-28 23:36 ` Junio C Hamano
2008-08-28 23:54 ` Jeff King
2008-08-29 0:10 ` Nathan W. Panike
2008-08-29 0:54 ` Jeff King
2008-08-29 1:08 ` Junio C Hamano [this message]
2008-08-29 8:12 ` Jakub Narebski
2008-08-29 3:43 ` Avery Pennarun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7viqtkbpcf.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=nathan.panike@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).