gitweb: get remotes too when getting heads list
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/14 gitweb: get remotes too when getting heads list
Signed-off-by Giuseppe Bilotta <[email protected]>
--- gitweb/gitweb.perl | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
gitweb/gitweb.perl +3 -2
@@ -2063,7 +2063,7 @@ sub git_get_heads_list { open my $fd, '-|', git_cmd(), 'for-each-ref', ($limit ? '--count='.($limit+1) : ()), '--sort=-committerdate', '--format=%(objectname) %(refname) %(subject)%00%(committer)', - 'refs/heads' + 'refs/heads', 'refs/remotes' or return; while (my $line = <$fd>) { my %ref_item;
@@ -2073,8 +2073,9 @@ sub git_get_heads_list { my ($hash, $name, $title) = split(' ', $refinfo, 3); my ($committer, $epoch, $tz) = ($committerinfo =~ /^(.*) ([0-9]+) (.*)$/); - $name =~ s!^refs/heads/!!; + $name =~ s!^refs/(head|remote)s/!!; + $ref_item{'class'} = $1; $ref_item{'name'} = $name; $ref_item{'id'} = $hash; $ref_item{'title'} = $title || '(no commit message)';
Signature · 1 line
1.5.2.5
Quoted 1 line · Giuseppe Bilotta
Signed-off-by Giuseppe Bilotta <[email protected]>
A-hem, sorry, I think I've done something seriously wrong with the patch sending. It should have been threaded under the previous thread, and my smtp server decided to throttle me after the second.
Let me see if I can get this right.
Signature · 1 line
Giuseppe "Oblomov" Bilotta