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

Re: [PATCH] gitweb: Paginate history output

From
Jakub Narebski <jnareb@gmail.com>
Date
Aug 22, 2006, 08:08 UTC
Message-ID
<ecee2g$b0l$1@sea.gmane.org>
In-Reply-To
<7vveols3c7.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 12 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes:
> 
>> @@ -1559,6 +1562,7 @@ sub git_history_body {
>>                      next;
>>              }
>>  
>> +            #my $ref = defined $refs ? format_ref_marker($refs, $commit) : '';
>>              my $ref = format_ref_marker($refs, $commit);
>>  
>>              if ($alternate) {
> 
> Do you want to change this or not?  Make up your mind.

I'm not sure. This is an internal function, so $refs should be defined. I'm not sure checking here is worth it.

This whole hunk could be removed.
Show 9 quoted lines
>> +            $paging_nav .= " &sdot; " .
>> +                    $cgi->a({-href => href(action=>"history", hash=>$hash, hash_base=>$hash_base,
>> +                                           file_name=>$file_name, page=>$page-1),
>> +                             -accesskey => "p", -title => "Alt-p"}, "prev");
> 
> This is something you inherited from the original and not your
> fault, but I am not sure if these -title entries are of good
> taste (we have corresponding "Alt-n" for "next").  Something
> more descriptive like "<Alt-p> for 100 newer changes", perhaps?
That would be better.
> Also, "first", "prev" and "next" have always confused me.  Maybe
> "latest", "older" and "newer" are better labels for them?

"first" is only for pagination of "history" action, "shortlog", "heads" and "tags" have "HEAD" there instead.

> Is 100 a good default?  It feels a bit unbalanced compared to
> the height of the default summary page with descriptions, 16
> shortlog entries, 16 tags and 12 heads.

It's 16 heads (if you have that many), from what I remember from source.

The purpose of summary page is to have everything at glance (it means that it should be contained in one, two pages. The pagination of output is to not send too much at once.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Junio C Hamano
Message 3 of 3 in “gitweb: Paginate history output”
  1. gitweb: Paginate history outputJakub Narebski, Aug 21, 2006
  2. Junio C HamanoAug 22, 2006
  3. Jakub NarebskiAug 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.