From: Junio C Hamano <gitster@pobox.com>
To: "Victoria Dye via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Victoria Dye <vdye@github.com>
Subject: Re: [PATCH] ref-filter.c: sort formatted dates by byte value
Date: Wed, 07 Feb 2024 19:11:40 -0800 [thread overview]
Message-ID: <xmqqzfwbps43.fsf@gitster.g> (raw)
In-Reply-To: <pull.1655.git.1707357439586.gitgitgadget@gmail.com> (Victoria Dye via GitGitGadget's message of "Thu, 08 Feb 2024 01:57:19 +0000")
"Victoria Dye via GitGitGadget" <gitgitgadget@gmail.com> 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.
next prev parent reply other threads:[~2024-02-08 3:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 1:57 [PATCH] ref-filter.c: sort formatted dates by byte value Victoria Dye via GitGitGadget
2024-02-08 3:11 ` Junio C Hamano [this message]
2024-02-09 2:46 ` Victoria Dye
2024-02-09 6:31 ` Junio C Hamano
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=xmqqzfwbps43.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=vdye@github.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.