Re: [PATCH] gitweb: clarify search results page when no matching commit found
On Wed, 21 Jul 2010, Jonathan Nieder wrote:
Show 29 quoted lines
> Erick Mattos wrote:
>
> > I did a search in gitweb
> > (http://git.kernel.org/?p=git/git.git;a=summary) by commit
> > e2007832552ccea9befed9003580c494f09e666e.
> >
> > Looks as gitweb's search is broken and giving false results.
>
> Maybe something like the following would help.
>
> -- 8< --
> When searching commits for a string that never occurs, the results
> page looks something like this:
>
> projects / foo.git / search \o/
> summary | ... | tree [commit] search: [ kfjdkas ] [ ]re
> first ⋅ prev ⋅ next
>
> Merge branch 'maint'
>
> Foo: a demonstration project
>
> Without a list of hits to compare it to, the header describing the
> commit named by the hash parameter (usually HEAD) may itself look
> like a hit. Add some text (“No match.”) to replace the empty
> list of hits to avoid this confusion.
>
> Noticed-by: Erick Mattos <erick.mattos@gmail.com>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Very good idea
Acked-by: Jakub Narebski <jnareb@gmail.com>
Show 13 quoted lines
> ---
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index cedc357..a47eed2 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -6522,12 +6522,13 @@ sub git_search {
> $paging_nav .= " ⋅ next";
> }
>
> - if ($#commitlist >= 100) {
> - }
> -P.S. I wonder WTF was that...
--
Jakub Narebski
Poland