* [RFC] implement branch.sort config option
@ 2018-08-13 9:56 Samuel Maftoul
2018-08-13 17:46 ` Jeff King
2018-08-13 19:18 ` Junio C Hamano
0 siblings, 2 replies; 3+ messages in thread
From: Samuel Maftoul @ 2018-08-13 9:56 UTC (permalink / raw)
To: git
Currently, you can:
git tag --sort=$sorting_key
You can also do this on branches:
git branch --sort=$sorting_key
For tags, you can also configure it with a config key:
git config tag.sort $sorting_key
But there is no corresponding config for sorting branches.
Locally, I have a (pretty simple) patch that implements the
branch.sort config key.
Should I contribute that ?
Judging the number of votes and the complexity of answers to this
question https://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit,
I would say it's a wanted and useful feature.
I'm still missing tests and docs, but if agreed the feature is useful,
I will write them.
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] implement branch.sort config option
2018-08-13 9:56 [RFC] implement branch.sort config option Samuel Maftoul
@ 2018-08-13 17:46 ` Jeff King
2018-08-13 19:18 ` Junio C Hamano
1 sibling, 0 replies; 3+ messages in thread
From: Jeff King @ 2018-08-13 17:46 UTC (permalink / raw)
To: Samuel Maftoul; +Cc: git
On Mon, Aug 13, 2018 at 11:56:58AM +0200, Samuel Maftoul wrote:
> Currently, you can:
>
> git tag --sort=$sorting_key
>
> You can also do this on branches:
>
> git branch --sort=$sorting_key
>
> For tags, you can also configure it with a config key:
>
> git config tag.sort $sorting_key
>
> But there is no corresponding config for sorting branches.
>
> Locally, I have a (pretty simple) patch that implements the
> branch.sort config key.
> Should I contribute that ?
Yes, that seems like a useful feature to me, and as you point out it
makes the overall interface more consistent.
-Peff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] implement branch.sort config option
2018-08-13 9:56 [RFC] implement branch.sort config option Samuel Maftoul
2018-08-13 17:46 ` Jeff King
@ 2018-08-13 19:18 ` Junio C Hamano
1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2018-08-13 19:18 UTC (permalink / raw)
To: Samuel Maftoul; +Cc: git
Samuel Maftoul <samuel.maftoul@gmail.com> writes:
> I'm still missing tests and docs, but if agreed the feature is useful,
> I will write them.
I personally think branch.sort would have about the same value as
the existing tag.sort, so if a patch is done well, it is likely that
users would find it valuable, but let's leave the final judgement
until we actually see the completed patch first.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-13 19:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-13 9:56 [RFC] implement branch.sort config option Samuel Maftoul
2018-08-13 17:46 ` Jeff King
2018-08-13 19:18 ` Junio C Hamano
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).