{"thread":{"id":"6082","subject":"[PATCH 1/4] gitweb: Add missing show '...' links change.","startedAt":"2006-12-22T19:38:11Z","lastAt":"2006-12-22T21:52:57Z","messageCount":8,"participants":["Robert Fitzsimons","Jakub Narebski","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"30084","messageId":"11668162952375-git-send-email-robfitz@273k.net","threadId":"6082","inReplyTo":null,"subject":"[PATCH 1/4] gitweb: Add missing show '...' links change.","fromName":"Robert Fitzsimons","fromEmail":"robfitz@273k.net","sentAt":"2006-12-22T19:38:11Z","receivedAt":"2006-12-22T19:38:11Z","isPatch":true,"sender":{"key":"robfitz@273k.net","avatar":null},"body":"Part of the patch for \"gitweb: Show '...' links in \"summary\" view only\nif there are more items\" (313ce8cee665447e4476d7e8985b270346a8e5a1) is\nmissing.  Add it back in.\n\nSigned-off-by: Robert Fitzsimons <robfitz@273k.net>\n---\n\n\nWith all the tooing and frowing this part of the original patch got\nlost.  I'm also resubmiting the original optimizations patches with a\nfew changes.\n\nRobert\n\n\n gitweb/gitweb.perl |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex ebbc397..80c04b8 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2983,6 +2983,7 @@ sub git_summary {\n \tif (@forklist) {\n \t\tgit_print_header_div('forks');\n \t\tgit_project_list_body(\\@forklist, undef, 0, 15,\n+\t\t                      $#forklist <= 15 ? undef :\n \t\t                      $cgi->a({-href => href(action=>\"forks\")}, \"...\"),\n \t\t\t\t      'noheader');\n \t}\n-- \n1.4.4.3.gc902c\n"},{"id":"30081","messageId":"11668162961084-git-send-email-robfitz@273k.net","threadId":"6082","inReplyTo":"11668162952375-git-send-email-robfitz@273k.net","subject":"[PATCH 1/4] gitweb: Add missing show '...' links change.","fromName":"Robert Fitzsimons","fromEmail":"robfitz@273k.net","sentAt":"2006-12-22T19:38:12Z","receivedAt":"2006-12-22T19:38:12Z","isPatch":true,"sender":{"key":"robfitz@273k.net","avatar":null},"body":"Part of the patch for \"gitweb: Show '...' links in \"summary\" view only\nif there are more items\" (313ce8cee665447e4476d7e8985b270346a8e5a1) is\nmissing.  Add it back in.\n\nSigned-off-by: Robert Fitzsimons <robfitz@273k.net>\n---\n\n\nWith all the tooing and frowing this part of the original patch got\nlost.  I'm also resubmiting the original optimizations patches with a\nfew changes.\n\nRobert\n\n\n\n gitweb/gitweb.perl |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex ebbc397..80c04b8 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2983,6 +2983,7 @@ sub git_summary {\n \tif (@forklist) {\n \t\tgit_print_header_div('forks');\n \t\tgit_project_list_body(\\@forklist, undef, 0, 15,\n+\t\t                      $#forklist <= 15 ? undef :\n \t\t                      $cgi->a({-href => href(action=>\"forks\")}, \"...\"),\n \t\t\t\t      'noheader');\n \t}\n-- \n1.4.4.3.gc902c\n"},{"id":"30083","messageId":"11668162963671-git-send-email-robfitz@273k.net","threadId":"6082","inReplyTo":"11668162961084-git-send-email-robfitz@273k.net","subject":"[PATCH 2/4] gitweb: optimize git_get_last_activity.","fromName":"Robert Fitzsimons","fromEmail":"robfitz@273k.net","sentAt":"2006-12-22T19:38:13Z","receivedAt":"2006-12-22T19:38:13Z","isPatch":true,"sender":{"key":"robfitz@273k.net","avatar":null},"body":"Only return one line of output and we don't need the refname value.\n\nSigned-off-by: Robert Fitzsimons <robfitz@273k.net>\n---\n gitweb/gitweb.perl |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 80c04b8..01e3a8a 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -1139,8 +1139,9 @@ sub git_get_last_activity {\n \n \t$git_dir = \"$projectroot/$path\";\n \topen($fd, \"-|\", git_cmd(), 'for-each-ref',\n-\t     '--format=%(refname) %(committer)',\n+\t     '--format=%(committer)',\n \t     '--sort=-committerdate',\n+\t     '--count=1',\n \t     'refs/heads') or return;\n \tmy $most_recent = <$fd>;\n \tclose $fd or return;\n-- \n1.4.4.3.gc902c\n"},{"id":"30085","messageId":"11668162963240-git-send-email-robfitz@273k.net","threadId":"6082","inReplyTo":"11668162963671-git-send-email-robfitz@273k.net","subject":"[PATCH 3/4] gitweb: optimize git_shortlog_body.","fromName":"Robert Fitzsimons","fromEmail":"robfitz@273k.net","sentAt":"2006-12-22T19:38:14Z","receivedAt":"2006-12-22T19:38:14Z","isPatch":true,"sender":{"key":"robfitz@273k.net","avatar":null},"body":"Don't call gitweb_have_snapshot from within the loop.\n\nSigned-off-by: Robert Fitzsimons <robfitz@273k.net>\n---\n gitweb/gitweb.perl |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 01e3a8a..d2ddac8 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2636,6 +2636,8 @@ sub git_shortlog_body {\n \t# uses global variable $project\n \tmy ($revlist, $from, $to, $refs, $extra) = @_;\n \n+\tmy $have_snapshot = gitweb_have_snapshot();\n+\n \t$from = 0 unless defined $from;\n \t$to = $#{$revlist} if (!defined $to || $#{$revlist} < $to);\n \n@@ -2663,7 +2665,7 @@ sub git_shortlog_body {\n \t\t      $cgi->a({-href => href(action=>\"commit\", hash=>$commit)}, \"commit\") . \" | \" .\n \t\t      $cgi->a({-href => href(action=>\"commitdiff\", hash=>$commit)}, \"commitdiff\") . \" | \" .\n \t\t      $cgi->a({-href => href(action=>\"tree\", hash=>$commit, hash_base=>$commit)}, \"tree\");\n-\t\tif (gitweb_have_snapshot()) {\n+\t\tif ($have_snapshot) {\n \t\t\tprint \" | \" . $cgi->a({-href => href(action=>\"snapshot\", hash=>$commit)}, \"snapshot\");\n \t\t}\n \t\tprint \"</td>\\n\" .\n-- \n1.4.4.3.gc902c\n"},{"id":"30082","messageId":"11668162972414-git-send-email-robfitz@273k.net","threadId":"6082","inReplyTo":"11668162963240-git-send-email-robfitz@273k.net","subject":"[PATCH 4/4] gitweb: optimize git_summary.","fromName":"Robert Fitzsimons","fromEmail":"robfitz@273k.net","sentAt":"2006-12-22T19:38:15Z","receivedAt":"2006-12-22T19:38:15Z","isPatch":true,"sender":{"key":"robfitz@273k.net","avatar":null},"body":"We don't need to call git_get_head_hash at all just pass in \"HEAD\" and\nuse the return id field.\n\nSigned-off-by: Robert Fitzsimons <robfitz@273k.net>\n---\n gitweb/gitweb.perl |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex d2ddac8..b0e6fdf 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2911,9 +2911,9 @@ sub git_project_index {\n \n sub git_summary {\n \tmy $descr = git_get_project_description($project) || \"none\";\n-\tmy $head = git_get_head_hash($project);\n-\tmy %co = parse_commit($head);\n+\tmy %co = parse_commit(\"HEAD\");\n \tmy %cd = parse_date($co{'committer_epoch'}, $co{'committer_tz'});\n+\tmy $head = $co{'id'};\n \n \tmy $owner = git_get_project_owner($project);\n \n@@ -2960,7 +2960,7 @@ sub git_summary {\n \t# we need to request one more than 16 (0..15) to check if\n \t# those 16 are all\n \topen my $fd, \"-|\", git_cmd(), \"rev-list\", \"--max-count=17\",\n-\t\tgit_get_head_hash($project), \"--\"\n+\t\t$head, \"--\"\n \t\tor die_error(undef, \"Open git-rev-list failed\");\n \tmy @revlist = map { chomp; $_ } <$fd>;\n \tclose $fd;\n-- \n1.4.4.3.gc902c\n"},{"id":"30088","messageId":"emhdpg$he9$2@sea.gmane.org","threadId":"6082","inReplyTo":"11668162963671-git-send-email-robfitz@273k.net","subject":"Re: [PATCH 2/4] gitweb: optimize git_get_last_activity.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-12-22T20:07:50Z","receivedAt":"2006-12-22T20:07:50Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Robert Fitzsimons wrote:\n\n> Only return one line of output and we don't need the refname value.\n\nRefname doesn't hurt and we have it \"for free\" (meaning: we have to\ncalculate it anyway to get commiterepoch). Although we do not use it.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"30090","messageId":"emhdru$he9$3@sea.gmane.org","threadId":"6082","inReplyTo":"11668162952375-git-send-email-robfitz@273k.net","subject":"Re: [PATCH 1/4] gitweb: Add missing show '...' links change.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-12-22T20:09:08Z","receivedAt":"2006-12-22T20:09:08Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Robert Fitzsimons wrote:\n\n> I'm also resubmiting the original optimizations patches with a\n> few changes.\n\nNice series of patches. Ack (FWIW).\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"30110","messageId":"7vtzznwqbq.fsf@assigned-by-dhcp.cox.net","threadId":"6082","inReplyTo":"emhdru$he9$3@sea.gmane.org","subject":"Re: [PATCH 1/4] gitweb: Add missing show '...' links change.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-12-22T21:52:57Z","receivedAt":"2006-12-22T21:52:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> Robert Fitzsimons wrote:\n>\n>> I'm also resubmiting the original optimizations patches with a\n>> few changes.\n>\n> Nice series of patches. Ack (FWIW).\n\nThanks both.\n"}]}