Re: [PATCH 4/7] gitweb: link heads and remotes view
- From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
- Date
- Sep 17, 2010, 16:01 UTC
- Message-ID
- <AANLkTi=vB-aoEnajR_Lif1XO7+4zgq3HK6he6umk=svJ@mail.gmail.com>
- In-Reply-To
- <201009170102.23053.jnareb@gmail.com>
2010/9/17 Jakub Narebski <jnareb@gmail.com>:
Show 8 quoted lines
> On Thu, 16 Sep 2010, Giuseppe Bilotta wrote: > >> Add a link in heads view to remotes view (if the feature is >> enabled), and conversely from remotes to heads. > > Good idea... but this commit message doesn't tell us *where* this link > do appear. It is in lower part (the action specific part) of page > navigation menu.
I will clarify it in the next rehash of this patchset.
Show 20 quoted lines
>> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
>> ---
>> gitweb/gitweb.perl | 10 ++++++++--
>> 1 files changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
>> index 0118739..6138c6e 100755
>> --- a/gitweb/gitweb.perl
>> +++ b/gitweb/gitweb.perl
>> @@ -5511,7 +5511,10 @@ sub git_tags {
>> sub git_heads {
>> my $head = git_get_head_hash($project);
>> git_header_html();
>> - git_print_page_nav('','', $head,undef,$head);
>> + my $heads_nav = gitweb_check_feature('remote_heads') ?
>> + $cgi->a({-href => href(action=>"remotes", -replay=>1)},
>> + "remotes") : undef;
>
> I think it would be more readable here to use 'if' statement instead
> of conditional operator.You're right. I'm actually thinking about putting 'tags' in that nav menu too, as it makes sense to link to all refs commands there.
-- Giuseppe "Oblomov" Bilotta