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

Re: [PATCH] gitweb: fix 'Use of uninitialized value' error in href()

From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date
Jul 31, 2009, 08:37 UTC
Message-ID
<cb7bb73a0907310137o6adb57a5tb05b6745b41b0f01@mail.gmail.com>
In-Reply-To
<200907311030.52643.jnareb@gmail.com>
2009/7/31 Jakub Narebski <jnareb@gmail.com>:
Show 7 quoted lines
> On Fri, 31 July 2009, Giuseppe Bilotta wrote:
>>
>> The funny thing is that I seem to get the error for something as simple
>> as a commit view (_any_ commit view, for the matter), but I wasn't able
>> to reproduce it from the shell, which is why I'm not adding a testcase.
>
> Gaaah! A Heisenbug! ;-)

Well, I can reproduce it consistently on the gitweb repository, with any shortlog or commit view. I also think I understand why it happens (i.e. in some cases the check for file_parent eq file_name is done before calling href). The question, of course, is why wouldn't it happen in the test repository.

Show 7 quoted lines
>> +                             if (defined $params{'file_parent'}) {
>> +                                     if (defined $params{'file_name'} && $params{'file_parent'} eq $params{'file_name'}) {
>
> or, to reduce line length even more:
>
>  +                                     if (defined $params{'file_name'} &&
>  +                                         $params{'file_parent'} eq $params{'file_name'}) {
Oh right ... should I resend?
-- 
Giuseppe "Oblomov" Bilotta
Previous: Jakub NarebskiNext: Junio C Hamano
Message 7 of 9 in “gitweb: suppress 'Use of uninitialized value' error”
  1. gitweb: suppress 'Use of uninitialized value' errorGiuseppe Bilotta, Jul 30, 2009
  2. Jakub NarebskiJul 30, 2009
  3. Giuseppe BilottaJul 31, 2009
  4. Jakub NarebskiJul 31, 2009
  5. gitweb: fix 'Use of uninitialized value' error in href()Giuseppe Bilotta, Jul 31, 2009
  6. Jakub NarebskiJul 31, 2009
  7. Giuseppe BilottaJul 31, 2009
  8. Junio C HamanoJul 31, 2009
  9. Junio C HamanoAug 4, 2009

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.