Merge branch 'gh/gitweb-branch-sort'

Tie-break branches that point at the same object in the list of
branches on GitWeb to show the one pointed at by HEAD early.

* gh/gitweb-branch-sort:
  gitweb: use HEAD as secondary sort key in git_get_heads_list()
This commit is contained in:
Junio C Hamano 2021-09-10 11:46:31 -07:00
commit 9762646ee4

View File

@ -3796,7 +3796,8 @@ sub git_get_heads_list {
my @headslist;
open my $fd, '-|', git_cmd(), 'for-each-ref',
($limit ? '--count='.($limit+1) : ()), '--sort=-committerdate',
($limit ? '--count='.($limit+1) : ()),
'--sort=-HEAD', '--sort=-committerdate',
'--format=%(objectname) %(refname) %(subject)%00%(committer)',
@patterns
or return;