diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-09-10 11:46:31 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-10 11:46:32 -0700 |
commit | 9762646ee42b775139b4d519d090808cbdd3bdeb (patch) | |
tree | 95f7c027cba20bbbc40d0a7737f9c50aaa2e9a88 /gitweb | |
parent | 05665a0dff77b5fc49e8e94b15087fb630a10ab0 (diff) | |
parent | a45e390ad6ad1f26967a40e7771777f70a77d719 (diff) | |
download | git-9762646ee42b775139b4d519d090808cbdd3bdeb.tar.gz |
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()
Diffstat (limited to 'gitweb')
-rwxr-xr-x | gitweb/gitweb.perl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index e09e024a09..fbd1c20a23 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -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; |