Re: [PATCH] ref-filter.c: sort formatted dates by byte value

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

 



"Victoria Dye via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

> Leaving the default (unformatted) date sorting unchanged, sorting by the
> formatted date string adds some flexibility to 'for-each-ref' by allowing
> for behavior like "sort by year, then by refname within each year" or "sort
> by time of day".

Hmph, what a strange use case, but understandable.

>     I came across a use case for 'git for-each-ref' at $DAYJOB in which I'd
>     want to sort by a portion of a formatted 'creatordate' (e.g., only the
>     time of day, sans date). When I tried to run something like 'git
>     for-each-ref --sort=creatordate:format:%H:%M:%S',

Hmph, this indeed is interesting ;-)

I wonder if there are other "sort by numeric but the thing could be
stringified by the end-user" atoms offered by for-each-ref
machinery.  IOW, is the timestamp the only thing that needs this
fix?

Thanks.




[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