{"thread":{"id":"5646","subject":"[PATCH 2/6] gitweb: Link to tree instead of snapshot in shortlog","startedAt":"2006-09-22T01:19:41Z","lastAt":"2006-09-23T08:59:22Z","messageCount":12,"participants":["Petr Baudis","Junio C Hamano","Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"27395","messageId":"20060922011941.15909.32671.stgit@rover","threadId":"5646","inReplyTo":null,"subject":"[PATCH 1/6] gitweb: More per-view navigation bar links","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-22T01:19:41Z","receivedAt":"2006-09-22T01:19:41Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Navigation bars in various views were empty or missed important items that\nshould have been there, e.g. getting a snapshot in tree view or log of\nancestry in commit view...\n\nThis feeble patch attempts to consolidate that.\n\nSigned-off-by: Petr Baudis <pasky@suse.cz>\n---\n\n gitweb/gitweb.perl |   42 ++++++++++++++++++++++++++++++++++++++----\n 1 files changed, 38 insertions(+), 4 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 0d2ff82..87df7bb 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2444,6 +2444,9 @@ sub git_blame2 {\n \t\t$cgi->a({-href => href(action=>\"blob\", hash=>$hash, hash_base=>$hash_base, file_name=>$file_name)},\n \t\t        \"blob\") .\n \t\t\" | \" .\n+\t\t$cgi->a({-href => href(action=>\"history\", hash=>$hash, hash_base=>$hash_base, file_name=>$file_name)},\n+\t\t\t\"history\") .\n+\t\t\" | \" .\n \t\t$cgi->a({-href => href(action=>\"blame\", file_name=>$file_name)},\n \t\t        \"head\");\n \tgit_print_page_nav('','', $hash_base,$co{'tree'},$hash_base, $formats_nav);\n@@ -2510,6 +2513,9 @@ sub git_blame {\n \t\t$cgi->a({-href => href(action=>\"blob\", hash=>$hash, hash_base=>$hash_base, file_name=>$file_name)},\n \t\t        \"blob\") .\n \t\t\" | \" .\n+\t\t$cgi->a({-href => href(action=>\"history\", hash=>$hash, hash_base=>$hash_base, file_name=>$file_name)},\n+\t\t\t\"history\") .\n+\t\t\" | \" .\n \t\t$cgi->a({-href => href(action=>\"blame\", file_name=>$file_name)},\n \t\t        \"head\");\n \tgit_print_page_nav('','', $hash_base,$co{'tree'},$hash_base, $formats_nav);\n@@ -2685,6 +2691,10 @@ sub git_blob {\n \t\t\t\t\t\" | \";\n \t\t\t}\n \t\t\t$formats_nav .=\n+\t\t\t\t$cgi->a({-href => href(action=>\"history\", hash_base=>$hash_base,\n+\t\t\t\t                       hash=>$hash, file_name=>$file_name)},\n+\t\t\t\t        \"history\") .\n+\t\t\t\t\" | \" .\n \t\t\t\t$cgi->a({-href => href(action=>\"blob_plain\",\n \t\t\t\t                       hash=>$hash, file_name=>$file_name)},\n \t\t\t\t        \"plain\") .\n@@ -2720,6 +2730,9 @@ sub git_blob {\n }\n \n sub git_tree {\n+\tmy ($ctype, $suffix, $command) = gitweb_check_feature('snapshot');\n+\tmy $have_snapshot = (defined $ctype && defined $suffix);\n+\n \tif (!defined $hash) {\n \t\t$hash = git_get_head_hash($project);\n \t\tif (defined $file_name) {\n@@ -2743,7 +2756,23 @@ sub git_tree {\n \tmy $base = \"\";\n \tmy ($have_blame) = gitweb_check_feature('blame');\n \tif (defined $hash_base && (my %co = parse_commit($hash_base))) {\n-\t\tgit_print_page_nav('tree','', $hash_base);\n+\t\tmy @views_nav = ();\n+\t\tif (defined $file_name) {\n+\t\t\tpush @views_nav,\n+\t\t\t\t$cgi->a({-href => href(action=>\"history\", hash_base=>$hash_base,\n+\t\t\t\t                       hash=>$hash, file_name=>$file_name)},\n+\t\t\t\t        \"history\"),\n+\t\t\t\t$cgi->a({-href => href(action=>\"tree\",\n+\t\t\t\t                       hash_base=>\"HEAD\", file_name=>$file_name)},\n+\t\t\t\t        \"head\");\n+\t\t}\n+\t\tif ($have_snapshot) {\n+\t\t\t# FIXME: Should be available when we have no hash base as well.\n+\t\t\tpush @views_nav,\n+\t\t\t\t$cgi->a({-href => href(action=>\"snapshot\")},\n+\t\t\t\t\t\"snapshot\");\n+\t\t}\n+\t\tgit_print_page_nav('tree','', $hash_base, undef, undef, join(' | ', @views_nav));\n \t\tgit_print_header_div('commit', esc_html($co{'title'}) . $ref, $hash_base);\n \t} else {\n \t\tundef $hash_base;\n@@ -2888,17 +2917,22 @@ sub git_commit {\n \tmy ($ctype, $suffix, $command) = gitweb_check_feature('snapshot');\n \tmy $have_snapshot = (defined $ctype && defined $suffix);\n \n-\tmy $formats_nav = '';\n+\tmy @views_nav = ();\n \tif (defined $file_name && defined $co{'parent'}) {\n \t\tmy $parent = $co{'parent'};\n-\t\t$formats_nav .=\n+\t\tpush @views_nav,\n \t\t\t$cgi->a({-href => href(action=>\"blame\", hash_parent=>$parent, file_name=>$file_name)},\n \t\t\t        \"blame\");\n \t}\n+\tif (defined $co{'parent'}) {\n+\t\tpush @views_nav,\n+\t\t\t$cgi->a({-href => href(action=>\"shortlog\", hash=>$hash)}, \"shortlog\"),\n+\t\t\t$cgi->a({-href => href(action=>\"log\", hash=>$hash)}, \"log\");\n+\t}\n \tgit_header_html(undef, $expires);\n \tgit_print_page_nav('commit', defined $co{'parent'} ? '' : 'commitdiff',\n \t                   $hash, $co{'tree'}, $hash,\n-\t                   $formats_nav);\n+\t                   join (' | ', @views_nav));\n \n \tif (defined $co{'parent'}) {\n \t\tgit_print_header_div('commitdiff', esc_html($co{'title'}) . $ref, $hash);\n"},{"id":"27394","messageId":"20060922011943.15909.22400.stgit@rover","threadId":"5646","inReplyTo":"20060922011941.15909.32671.stgit@rover","subject":"[PATCH 2/6] gitweb: Link to tree instead of snapshot in shortlog","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-22T01:19:44Z","receivedAt":"2006-09-22T01:19:44Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Signed-off-by: Petr Baudis <pasky@suse.cz>\n---\n\n gitweb/gitweb.perl |    9 ++-------\n 1 files changed, 2 insertions(+), 7 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 87df7bb..1b1653a 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -1976,9 +1976,6 @@ sub git_shortlog_body {\n \t# uses global variable $project\n \tmy ($revlist, $from, $to, $refs, $extra) = @_;\n \n-\tmy ($ctype, $suffix, $command) = gitweb_check_feature('snapshot');\n-\tmy $have_snapshot = (defined $ctype && defined $suffix);\n-\n \t$from = 0 unless defined $from;\n \t$to = $#{$revlist} if (!defined $to || $#{$revlist} < $to);\n \n@@ -2004,10 +2001,8 @@ sub git_shortlog_body {\n \t\tprint \"</td>\\n\" .\n \t\t      \"<td class=\\\"link\\\">\" .\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\tif ($have_snapshot) {\n-\t\t\tprint \" | \" .  $cgi->a({-href => href(action=>\"snapshot\", hash=>$commit)}, \"snapshot\");\n-\t\t}\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\tprint \"</td>\\n\" .\n \t\t      \"</tr>\\n\";\n \t}\n"},{"id":"27399","messageId":"20060922011946.15909.10313.stgit@rover","threadId":"5646","inReplyTo":"20060922011941.15909.32671.stgit@rover","subject":"[PATCH 3/6] gitweb: Link to latest tree from the head line in heads list","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-22T01:19:46Z","receivedAt":"2006-09-22T01:19:46Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Signed-off-by: Petr Baudis <pasky@suse.cz>\n---\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 1b1653a..0a91394 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2164,7 +2164,8 @@ sub git_heads_body {\n \t\t      \"</td>\\n\" .\n \t\t      \"<td class=\\\"link\\\">\" .\n \t\t      $cgi->a({-href => href(action=>\"shortlog\", hash=>$tag{'name'})}, \"shortlog\") . \" | \" .\n-\t\t      $cgi->a({-href => href(action=>\"log\", hash=>$tag{'name'})}, \"log\") .\n+\t\t      $cgi->a({-href => href(action=>\"log\", hash=>$tag{'name'})}, \"log\") . \" | \" .\n+\t\t      $cgi->a({-href => href(action=>\"tree\", hash=>$tag{'name'}, hash_base=>$tag{'name'})}, \"tree\") .\n \t\t      \"</td>\\n\" .\n \t\t      \"</tr>\";\n \t}\n"},{"id":"27397","messageId":"20060922011948.15909.59511.stgit@rover","threadId":"5646","inReplyTo":"20060922011941.15909.32671.stgit@rover","subject":"[PATCH 4/6] gitweb: Link to associated tree from a particular log item in full log view","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-22T01:19:48Z","receivedAt":"2006-09-22T01:19:48Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Signed-off-by: Petr Baudis <pasky@suse.cz>\n---\n\n gitweb/gitweb.perl |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 0a91394..45a5fbf 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2873,6 +2873,8 @@ sub git_log {\n \t\t      $cgi->a({-href => href(action=>\"commit\", hash=>$commit)}, \"commit\") .\n \t\t      \" | \" .\n \t\t      $cgi->a({-href => href(action=>\"commitdiff\", hash=>$commit)}, \"commitdiff\") .\n+\t\t      \" | \" .\n+\t\t      $cgi->a({-href => href(action=>\"tree\", hash=>$commit), hash_base=>$commit}, \"tree\") .\n \t\t      \"<br/>\\n\" .\n \t\t      \"</div>\\n\" .\n \t\t      \"<i>\" . esc_html($co{'author_name'}) .  \" [$ad{'rfc2822'}]</i><br/>\\n\" .\n"},{"id":"27398","messageId":"20060922011950.15909.78402.stgit@rover","threadId":"5646","inReplyTo":"20060922011941.15909.32671.stgit@rover","subject":"[PATCH 5/6] gitweb: Rename \"plain\" labels to \"raw\"","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-22T01:19:50Z","receivedAt":"2006-09-22T01:19:50Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"I don't have much preference either way and as far as I'm concerned, it may\ngo the other way as well. Consistency is what is important.\n\nSigned-off-by: Petr Baudis <pasky@suse.cz>\n---\n\n gitweb/gitweb.perl |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 45a5fbf..7b44c28 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2693,14 +2693,14 @@ sub git_blob {\n \t\t\t\t\" | \" .\n \t\t\t\t$cgi->a({-href => href(action=>\"blob_plain\",\n \t\t\t\t                       hash=>$hash, file_name=>$file_name)},\n-\t\t\t\t        \"plain\") .\n+\t\t\t\t        \"raw\") .\n \t\t\t\t\" | \" .\n \t\t\t\t$cgi->a({-href => href(action=>\"blob\",\n \t\t\t\t                       hash_base=>\"HEAD\", file_name=>$file_name)},\n \t\t\t\t        \"head\");\n \t\t} else {\n \t\t\t$formats_nav .=\n-\t\t\t\t$cgi->a({-href => href(action=>\"blob_plain\", hash=>$hash)}, \"plain\");\n+\t\t\t\t$cgi->a({-href => href(action=>\"blob_plain\", hash=>$hash)}, \"raw\");\n \t\t}\n \t\tgit_print_page_nav('','', $hash_base,$co{'tree'},$hash_base, $formats_nav);\n \t\tgit_print_header_div('commit', esc_html($co{'title'}), $hash_base);\n@@ -3109,7 +3109,7 @@ sub git_blobdiff {\n \t\t\t                       hash=>$hash, hash_parent=>$hash_parent,\n \t\t\t                       hash_base=>$hash_base, hash_parent_base=>$hash_parent_base,\n \t\t\t                       file_name=>$file_name, file_parent=>$file_parent)},\n-\t\t\t        \"plain\");\n+\t\t\t        \"raw\");\n \t\tgit_header_html(undef, $expires);\n \t\tif (defined $hash_base && (my %co = parse_commit($hash_base))) {\n \t\t\tgit_print_page_nav('','', $hash_base,$co{'tree'},$hash_base, $formats_nav);\n@@ -3212,7 +3212,7 @@ sub git_commitdiff {\n \t\tmy $formats_nav =\n \t\t\t$cgi->a({-href => href(action=>\"commitdiff_plain\",\n \t\t\t                       hash=>$hash, hash_parent=>$hash_parent)},\n-\t\t\t        \"plain\");\n+\t\t\t        \"raw\");\n \n \t\tgit_header_html(undef, $expires);\n \t\tgit_print_page_nav('commitdiff','', $hash,$co{'tree'},$hash, $formats_nav);\n"},{"id":"27396","messageId":"20060922011952.15909.67857.stgit@rover","threadId":"5646","inReplyTo":"20060922011941.15909.32671.stgit@rover","subject":"[PATCH 6/6] gitweb: Relabel \"head\" as \"HEAD\"","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-22T01:19:53Z","receivedAt":"2006-09-22T01:19:53Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"\"head\" is a reference in refs/heads/, while those labels mean HEAD,\nthe latest revision of the default branch.\n\nSigned-off-by: Petr Baudis <pasky@suse.cz>\n---\n\n gitweb/gitweb.perl |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 7b44c28..9c3546f 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2444,7 +2444,7 @@ sub git_blame2 {\n \t\t\t\"history\") .\n \t\t\" | \" .\n \t\t$cgi->a({-href => href(action=>\"blame\", file_name=>$file_name)},\n-\t\t        \"head\");\n+\t\t        \"HEAD\");\n \tgit_print_page_nav('','', $hash_base,$co{'tree'},$hash_base, $formats_nav);\n \tgit_print_header_div('commit', esc_html($co{'title'}), $hash_base);\n \tgit_print_page_path($file_name, $ftype, $hash_base);\n@@ -2513,7 +2513,7 @@ sub git_blame {\n \t\t\t\"history\") .\n \t\t\" | \" .\n \t\t$cgi->a({-href => href(action=>\"blame\", file_name=>$file_name)},\n-\t\t        \"head\");\n+\t\t        \"HEAD\");\n \tgit_print_page_nav('','', $hash_base,$co{'tree'},$hash_base, $formats_nav);\n \tgit_print_header_div('commit', esc_html($co{'title'}), $hash_base);\n \tgit_print_page_path($file_name, 'blob', $hash_base);\n@@ -2697,7 +2697,7 @@ sub git_blob {\n \t\t\t\t\" | \" .\n \t\t\t\t$cgi->a({-href => href(action=>\"blob\",\n \t\t\t\t                       hash_base=>\"HEAD\", file_name=>$file_name)},\n-\t\t\t\t        \"head\");\n+\t\t\t\t        \"HEAD\");\n \t\t} else {\n \t\t\t$formats_nav .=\n \t\t\t\t$cgi->a({-href => href(action=>\"blob_plain\", hash=>$hash)}, \"raw\");\n@@ -2760,7 +2760,7 @@ sub git_tree {\n \t\t\t\t        \"history\"),\n \t\t\t\t$cgi->a({-href => href(action=>\"tree\",\n \t\t\t\t                       hash_base=>\"HEAD\", file_name=>$file_name)},\n-\t\t\t\t        \"head\");\n+\t\t\t\t        \"HEAD\"),\n \t\t}\n \t\tif ($have_snapshot) {\n \t\t\t# FIXME: Should be available when we have no hash base as well.\n"},{"id":"27401","messageId":"7vmz8s7cvy.fsf@assigned-by-dhcp.cox.net","threadId":"5646","inReplyTo":"20060922011948.15909.59511.stgit@rover","subject":"Re: [PATCH 4/6] gitweb: Link to associated tree from a particular log item in full log view","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-09-22T04:18:09Z","receivedAt":"2006-09-22T04:18:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I presume you are running this version at repo.or.cz, but\n\n(1) go to http://repo.or.cz/?p=stgit.git;a=log\n(2) pick \"tree\" of one of the commits\n(3) go browser-back, then pick \"tree\" from the top navbar\n\nThe resulting tree view of (2) lacks navbar while (3) looks much\nsaner.\n\nYou do not have the tree object name available in git_log to\ngenerate an URL with both h and hb, and getting to it is an\nextra work.\n\nThis would fix this particular breakage.\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 34ef3fc..8c0fdf3 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2732,9 +2732,9 @@ sub git_tree {\n \t\t\tmy $base = $hash_base || $hash;\n \t\t\t$hash = git_get_hash_by_path($base, $file_name, \"tree\");\n \t\t}\n-\t\tif (!defined $hash_base) {\n-\t\t\t$hash_base = $hash;\n-\t\t}\n+\t}\n+\tif (!defined $hash_base) {\n+\t\t$hash_base = $hash;\n \t}\n \t$/ = \"\\0\";\n \topen my $fd, \"-|\", git_cmd(), \"ls-tree\", '-z', $hash\n"},{"id":"27407","messageId":"ef08v5$mk9$1@sea.gmane.org","threadId":"5646","inReplyTo":"20060922011950.15909.78402.stgit@rover","subject":"Re: [PATCH 5/6] gitweb: Rename \"plain\" labels to \"raw\"","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-22T09:04:49Z","receivedAt":"2006-09-22T09:04:49Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Petr Baudis wrote:\n\n> I don't have much preference either way and as far as I'm concerned, it may\n> go the other way as well. Consistency is what is important.\n\n\"raw\" link was introduced in 25b7c18ecd9779158cb1c02572396bab22c6e0cf\nby Luben Tuikov. I'd rather use \"plain\"...\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"27424","messageId":"20060922230937.GC8259@pasky.or.cz","threadId":"5646","inReplyTo":"ef08v5$mk9$1@sea.gmane.org","subject":"Re: [PATCH 5/6] gitweb: Rename \"plain\" labels to \"raw\"","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-22T23:09:37Z","receivedAt":"2006-09-22T23:09:37Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Fri, Sep 22, 2006 at 11:04:49AM CEST, I got a letter\nwhere Jakub Narebski <jnareb@gmail.com> said that...\n> Petr Baudis wrote:\n> \n> > I don't have much preference either way and as far as I'm concerned, it may\n> > go the other way as well. Consistency is what is important.\n> \n> \"raw\" link was introduced in 25b7c18ecd9779158cb1c02572396bab22c6e0cf\n> by Luben Tuikov. I'd rather use \"plain\"...\n\nI kind of like \"raw\" more because it's IMHO more obvious what it exactly\nis (it could also mean some stripped-down HTML or whatever otherwise)\nand is more appropriate for things that actually are not plaintext, like\npictures.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\nlK[d2%Sa2/d0$^Ixp\"|dc`;s/\\W//g;$_=pack('H*',/((..)*)$/)\n"},{"id":"27425","messageId":"20060922231315.GD8259@pasky.or.cz","threadId":"5646","inReplyTo":"7vmz8s7cvy.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 4/6] gitweb: Link to associated tree from a particular log item in full log view","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-22T23:13:15Z","receivedAt":"2006-09-22T23:13:15Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Fri, Sep 22, 2006 at 06:18:09AM CEST, I got a letter\nwhere Junio C Hamano <junkio@cox.net> said that...\n> I presume you are running this version at repo.or.cz, but\n> \n> (1) go to http://repo.or.cz/?p=stgit.git;a=log\n> (2) pick \"tree\" of one of the commits\n> (3) go browser-back, then pick \"tree\" from the top navbar\n> \n> The resulting tree view of (2) lacks navbar while (3) looks much\n> saner.\n\nOops. It's trivial typo:\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex d2366c7..c5f3810 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2880,7 +2880,7 @@ sub git_log {\n \t\t      \" | \" .\n \t\t      $cgi->a({-href => href(action=>\"commitdiff\", hash=>$commit)}, \"commitdiff\") .\n \t\t      \" | \" .\n-\t\t      $cgi->a({-href => href(action=>\"tree\", hash=>$commit), hash_base=>$commit}, \"tree\") .\n+\t\t      $cgi->a({-href => href(action=>\"tree\", hash=>$commit, hash_base=>$commit)}, \"tree\") .\n \t\t      \"<br/>\\n\" .\n \t\t      \"</div>\\n\" .\n \t\t      \"<i>\" . esc_html($co{'author_name'}) .  \" [$ad{'rfc2822'}]</i><br/>\\n\" .\n\n> You do not have the tree object name available in git_log to\n> generate an URL with both h and hb, and getting to it is an\n> extra work.\n\nWell using commit hash as a tree id works just fine...\n\n> This would fix this particular breakage.\n\nMy knowledge of gitweb.perl innards isn't good enough for me to safely\nack/nak a change such deep down the chain.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\nlK[d2%Sa2/d0$^Ixp\"|dc`;s/\\W//g;$_=pack('H*',/((..)*)$/)\n"},{"id":"27432","messageId":"7vodt7xvgu.fsf@assigned-by-dhcp.cox.net","threadId":"5646","inReplyTo":"20060922231315.GD8259@pasky.or.cz","subject":"Re: [PATCH 4/6] gitweb: Link to associated tree from a particular log item in full log view","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-09-23T00:44:33Z","receivedAt":"2006-09-23T00:44:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Petr Baudis <pasky@suse.cz> writes:\n\n> Oops. It's trivial typo:\n>\n> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n> index d2366c7..c5f3810 100755\n> --- a/gitweb/gitweb.perl\n> +++ b/gitweb/gitweb.perl\n> @@ -2880,7 +2880,7 @@ sub git_log {\n>  \t\t      \" | \" .\n>  \t\t      $cgi->a({-href => href(action=>\"commitdiff\", hash=>$commit)}, \"commitdiff\") .\n>  \t\t      \" | \" .\n> -\t\t      $cgi->a({-href => href(action=>\"tree\", hash=>$commit), hash_base=>$commit}, \"tree\") .\n> +\t\t      $cgi->a({-href => href(action=>\"tree\", hash=>$commit, hash_base=>$commit)}, \"tree\") .\n>  \t\t      \"<br/>\\n\" .\n>  \t\t      \"</div>\\n\" .\n>  \t\t      \"<i>\" . esc_html($co{'author_name'}) .  \" [$ad{'rfc2822'}]</i><br/>\\n\" .\n>\n>> You do not have the tree object name available in git_log to\n>> generate an URL with both h and hb, and getting to it is an\n>> extra work.\n>\n> Well using commit hash as a tree id works just fine...\n\nI agree that change is much safer.  Will apply with an\nappropriate log message and attribution.  No need to resend.\n"},{"id":"27456","messageId":"ef2t16$bcp$2@sea.gmane.org","threadId":"5646","inReplyTo":"7vodt7xvgu.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 4/6] gitweb: Link to associated tree from a particular log item in full log view","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-23T08:59:22Z","receivedAt":"2006-09-23T08:59:22Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n\n> Petr Baudis <pasky@suse.cz> writes:\n> \n>> Oops. It's trivial typo:\n>>\n>> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n>> index d2366c7..c5f3810 100755\n>> --- a/gitweb/gitweb.perl\n>> +++ b/gitweb/gitweb.perl\n>> @@ -2880,7 +2880,7 @@ sub git_log {\n>>                    \" | \" .\n>>                    $cgi->a({-href => href(action=>\"commitdiff\", hash=>$commit)}, \"commitdiff\") .\n>>                    \" | \" .\n>> -                  $cgi->a({-href => href(action=>\"tree\", hash=>$commit), hash_base=>$commit}, \"tree\") .\n>> +                  $cgi->a({-href => href(action=>\"tree\", hash=>$commit, hash_base=>$commit)}, \"tree\") .\n>>                    \"<br/>\\n\" .\n>>                    \"</div>\\n\" .\n>>                    \"<i>\" . esc_html($co{'author_name'}) .  \" [$ad{'rfc2822'}]</i><br/>\\n\" .\n>>\n>>> You do not have the tree object name available in git_log to\n>>> generate an URL with both h and hb, and getting to it is an\n>>> extra work.\n>>\n>> Well using commit hash as a tree id works just fine...\n> \n> I agree that change is much safer.  Will apply with an\n> appropriate log message and attribution.  No need to resend.\n\nI think that hash_base without hash should be enough. But I'm not\nsure if it is. Well, commit hash is tree-ish...\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"}]}