Subject: Re: [PATCHv6 07/10] gitweb: remotes view for a single remote

From: Jakub Narebski <[email-masked]>
Date: Mon, 25 Oct 2010 17:12:28 +0200

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 remote

It also strips uninteresting '<remote>/' prefix, isn't it?
It would be nice, though not necessary, to have this in comment.

> +		@remotelist = map {
> +			my $ref = $_ ;
> +			$ref->{'name'} =~ s!^$remote/!!;
> +			$ref
> +		} git_get_heads_list(undef, "remotes/$remote");
> +	} else {

-- 
Jakub Narebski
Poland