git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitweb: whitespace cleanup around '='

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 22, 2006, 07:32 UTC
Message-ID
<e7dh1c$61n$1@sea.gmane.org>
In-Reply-To
<7vejxhwts4.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 29 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes:
> 
>> @@ -326,7 +326,7 @@ EOF
>>              } elsif (defined $hash) {
>>                      $search_hash = $hash;
>>              } else {
>> -                    $search_hash  = "HEAD";
>> +                    $search_hash = "HEAD";
>>              }
>>              $cgi->param("a", "search");
>>              $cgi->param("h", $search_hash);
> 
> My copy from "next" has this part like the following:
> 
>               if (!defined $searchtext) {
>                       $searchtext = "";
>               }
>               my $search_hash;
>               if (defined $hash) {
>                       $search_hash = $hash;
>               } else {
>                       $search_hash  = "HEAD";
>               }
> 
> I thought we were both reasonably sure that we are now in
> sync...  I could apply it by hand but once I start doing that
> I'm afraid we will never converge.
> 
> It's quite frustrating.
I'm very sorry, I forgot that I applied Timo Hirvonen patch
  "[PATCH] gitweb: Start search from HEAD"
  (<20060620152515.23e59396.tihirvon@gmail.com>)
  http://permalink.gmane.org/gmane.comp.version-control.git/22197>
on top of 'next'.

This patch fixes search quite nicely, reducing significantly number of error messages during search (e.g. starting search from blob or file view).

Any reason not to apply it?
Show 13 quoted lines
>>              my $path = esc_html(chop_str($proj{'path'}, 25, 5));
>> -            my $rss =  "$my_url?p=$proj{'path'};a=rss";
>> -            my $html =  "$my_url?p=$proj{'path'};a=summary";
>> +            my $rss  = "$my_url?p=$proj{'path'};a=rss";
>> +            my $html = "$my_url?p=$proj{'path'};a=summary";
> 
> Are you sure you want to do "my $rss two-spaces equal space"?
> 
> I've fixed up the whitespace you missed and will be applying the
> following on top of what is in "next" tonight.
> 
> -- >8 --
> gitweb: do not align assignment = with extra whitespaces

My idea for coding style is to align assignment = with extra whitespaces, but only where aligned assignments statements are one after another.

The above "my $rss" example was mistyped as " = " instead of " = ", but I think it was meant to be aligned at '='. IMHO aligning at assign makes code more readable.

But that is just my opinion.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 14 in “gitk lower pane (commit and files view) scrollbar extends past gitk window”
  1. Jakub NarebskiJun 21, 2006
  2. Edgar ToernigJun 22, 2006
  3. gitweb: whitespace cleanup around '='Jakub Narebski, Jun 22, 2006
  4. Jakub NarebskiJun 22, 2006
  5. Junio C HamanoJun 22, 2006
  6. Jakub NarebskiJun 22, 2006
  7. Junio C HamanoJun 22, 2006
  8. Jakub NarebskiJun 22, 2006
  9. Junio C HamanoJun 22, 2006
  10. Jakub NarebskiJun 22, 2006
  11. Santi BéjarJun 22, 2006
  12. Alex RiesenJun 22, 2006
  13. [WORKAROUND] gitk lower pane scrollbar extends past gitk windowJakub Narebski, Jun 22, 2006
  14. Jakub NarebskiJun 22, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.