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

Re: [PATCH] gitweb: fix "next" link on bottom of commit log page

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 2, 2008, 08:52 UTC
Message-ID
<m3d4n01anr.fsf@localhost.localdomain>
In-Reply-To
<m3y75s1a9v.fsf@localhost.localdomain>
Jakub Narebski <jnareb@gmail.com> writes:
Show 15 quoted lines
> Gerrit Pape <pape@smarden.org> writes:
> 
> > When viewing a gitweb repository commit log, the "next" link at the top
> > of the page works as expected, the "next" link on the bottom of the page
> > has a=search instead of a=log and thus fails to get you to the next
> > page.  This commit replaces the bottom "next" link with the same links
> > as shown at the top of the page.
> 
> > -		print $cgi->a({-href => href(-replay=>1, page=>$page+1),
> > -			       -accesskey => "n", -title => "Alt-n"}, "next");
> 
> Should not happen: href(-replay=>1, ...) should have the same value
> of 'a' parameter as the page it is in, so it should be 'log' not 'search'.
> 
> Will investigate.

Now I know what is happening. git_header_html() modifies parameters in $cgi, and href(-replay, ...) uses paramemeters values from $cgi, not saved in variables (although it could).

So the correct solution would be to change the part which generates search form in git_header_html() to _not_ modify $cgi->params().

Patch will follow...

P.S. I wonder if using Test::WWW::Mechanize (from CPAN) to test gitweb's HTML output would be a good idea...

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Jakub NarebskiNext: Jakub Narebski
Message 3 of 5 in “gitweb: fix "next" link on bottom of commit log page”
  1. gitweb: fix "next" link on bottom of commit log pageGerrit Pape, May 29, 2008
  2. Jakub NarebskiMay 30, 2008
  3. Jakub NarebskiJun 2, 2008
  4. gitweb: Fix "next" link on bottom of pageJakub Narebski, Jun 2, 2008
  5. Gerrit PapeJun 2, 2008

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.