Skip to content

Commit 9762646

Browse files
committed
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()
2 parents 05665a0 + a45e390 commit 9762646

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gitweb/gitweb.perl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3796,7 +3796,8 @@ sub git_get_heads_list {
37963796
my @headslist;
37973797

37983798
open my $fd, '-|', git_cmd(), 'for-each-ref',
3799-
($limit ? '--count='.($limit+1) : ()), '--sort=-committerdate',
3799+
($limit ? '--count='.($limit+1) : ()),
3800+
'--sort=-HEAD', '--sort=-committerdate',
38003801
'--format=%(objectname) %(refname) %(subject)%00%(committer)',
38013802
@patterns
38023803
or return;

0 commit comments

Comments
 (0)