Re: [PATCH] gitweb: fix problem causing erroneous project list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jakub Narębski <jnareb@xxxxxxxxx> writes:

>>> Instead, clear $search_regexp before dispatching each request.
>>>
>>> Signed-off-by: Charles McGarvey <chazmcgarvey@xxxxxxxxxxxxxxxx>
>
> Acked-by: Jakub Narebski <jnareb@xxxxxxxxx>

Thanks (the ack was a few hours too late and the commit is already
in 'next', so I won't be able to rewind it though).

>> By the way, I looked at how $search_regexp is used in the code:
>
> How $search_regexp is used does not matter. What was intended
> (but was not implemented) is for $search_regexp to matter and to
> be used only if $searchtext is defined.  $searchtext is reset on each
> request, so $search_regexp should be also reset... like in Charles's
> patch.

Oh, we are in total agreement about that.  That is why the part is
marked with "By the way"---it is an orthogonal issue (which turned
out to be a non-issue).

>>  x git_search_files and git_search_grep_body assume that
>>    $search_regexp can be interpolated in m//, which is not very
>>    nice.  They want an empty string.
>
> But both git_search_files() and git_search_grep_body() are run from
> git_search(), which "dies" (returns HTTP 400 "Text field is empty" error)
> if $searchtext is not defined; if $searchtext is defined then $search_regexp
> is string and is never undef.

Thanks; that is what I missed.

>> So as an independent fix, the two subs may want to be fixed if we
>> want to be undef clean.  Or am I missing something?

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]