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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> 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@xxxxxxxx>

Like the idea; haven't looked at the patch yet, though.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux