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
Родитель 05665a0dff a45e390ad6
Коммит 9762646ee4
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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;