Re: [PATCHv6 07/10] gitweb: remotes view for a single remote
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Oct 25, 2010, 15:12 UTC
- Message-ID
- <201010251712.30362.jnareb@gmail.com>
- In-Reply-To
- <1287917136-26103-8-git-send-email-giuseppe.bilotta@gmail.com>
On Sun, 24 Oct 2010, Giuseppe Bilotta wrote:
> When 'remotes' view is passed the 'hash' parameter, interpret it as the > name of a remote and limit the view the the heads of that remote.
I don't quite like (ab)using 'hash' parameter like that, but because it allows us to use e.g. 'project.git/remotes/origin' path_info without writing special code for that, I am all right with this hack.
> > In single-remote view we let the user switch easily to the default > remotes view by specifying an -action_extra for the page header and by > enabling the 'remotes' link in the reference navigation submenu.
Nice!
> + if (defined $remote) {
> + # only display the heads in a given remoteIt also strips uninteresting '<remote>/' prefix, isn't it? It would be nice, though not necessary, to have this in comment.
Show 6 quoted lines
> + @remotelist = map {
> + my $ref = $_ ;
> + $ref->{'name'} =~ s!^$remote/!!;
> + $ref
> + } git_get_heads_list(undef, "remotes/$remote");
> + } else {-- Jakub Narebski Poland