threads / discuss / 36865

sort entries numerically

Subject: sort entries numerically

## tl;dr

3 messages between Jun 7, 2014 and Jun 7, 2014.

replies: 2people: 3as markdown or json

Toralf Förster· Jun 7, 2014, 06:05 UTC · lore
Hi,
is there any chance to have "1.8" before "1.10" in an output like the following :
...
From https://code.wireshark.org/review/wireshark
   52fe0aa..b69642d  master     -> origin/master
   460db8a..540f061  master-1.10 -> origin/master-1.10
   25bb29a..5741a40  master-1.12 -> origin/master-1.12
   4ee4fc11..97898a2 master-1.8 -> origin/master-1.8
-- 
Toralf
Fredrik Gustafsson· Jun 7, 2014, 10:38 UTC · re: Toralf Förster · lore

Re: sort entries numerically

On Sat, Jun 07, 2014 at 08:05:34AM +0200, Toralf Förster wrote:
Show 8 quoted lines
> is there any chance to have "1.8" before "1.10" in an output like the following :
> 
> ...
> From https://code.wireshark.org/review/wireshark
>    52fe0aa..b69642d  master     -> origin/master
>    460db8a..540f061  master-1.10 -> origin/master-1.10
>    25bb29a..5741a40  master-1.12 -> origin/master-1.12
>    4ee4fc11..97898a2 master-1.8 -> origin/master-1.8
I don't find anything about it in git branch man page. However there's always:
git <command> | sort -d -r
as a workaround.
-- 
Med vänlig hälsning
Fredrik Gustafsson

tel: 0733-608274
e-post: iveqy@iveqy.com
Duy Nguyen· Jun 7, 2014, 10:54 UTC · re: Toralf Förster · lore

Re: sort entries numerically

On Sat, Jun 7, 2014 at 1:05 PM, Toralf Förster <toralf.foerster@gmx.de> wrote:
Show 10 quoted lines
> Hi,
>
> is there any chance to have "1.8" before "1.10" in an output like the following :
>
> ...
> From https://code.wireshark.org/review/wireshark
>    52fe0aa..b69642d  master     -> origin/master
>    460db8a..540f061  master-1.10 -> origin/master-1.10
>    25bb29a..5741a40  master-1.12 -> origin/master-1.12
>    4ee4fc11..97898a2 master-1.8 -> origin/master-1.8

git-tag supports version sorting. Not sure if it should be default sorting order in these listings (from fetch and push?). Maybe we could have a config key for default sorting order.

-- 
Duy

← back to recent threads