{"thread":{"id":"6026","subject":"[PATCH] gitweb: Restore object-named links in item lists","startedAt":"2006-10-24T03:12:40Z","lastAt":"2006-10-24T08:51:53Z","messageCount":4,"participants":["Petr Baudis","Luben Tuikov","Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"29797","messageId":"20061024031240.2500.93420.stgit@rover","threadId":"6026","inReplyTo":null,"subject":"[PATCH] gitweb: Restore object-named links in item lists","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-10-24T03:12:40Z","receivedAt":"2006-10-24T03:12:40Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"This restores the redundant links removed earlier. It supersedes my patch\nto stick slashes to tree entries.\n\nSigned-off-by: Petr Baudis <pasky@suse.cz>\n---\n\n gitweb/gitweb.perl |   33 +++++++++++++++++++++++++++------\n 1 files changed, 27 insertions(+), 6 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 4a2025c..695c632 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -1793,16 +1793,18 @@ sub git_print_tree_entry {\n \t\t\t                       file_name=>\"$basedir$t->{'name'}\", %base_key),\n \t\t\t        -class => \"list\"}, esc_html($t->{'name'})) . \"</td>\\n\";\n \t\tprint \"<td class=\\\"link\\\">\";\n+\t\tprint $cgi->a({-href => href(action=>\"blob\", hash=>$t->{'hash'},\n+\t\t\t\t\t     file_name=>\"$basedir$t->{'name'}\", %base_key)},\n+\t\t\t      \"blob\");\n \t\tif ($have_blame) {\n-\t\t\tprint $cgi->a({-href => href(action=>\"blame\", hash=>$t->{'hash'},\n+\t\t\tprint \" | \" .\n+\t\t\t      $cgi->a({-href => href(action=>\"blame\", hash=>$t->{'hash'},\n \t\t\t\t                           file_name=>\"$basedir$t->{'name'}\", %base_key)},\n \t\t\t\t            \"blame\");\n \t\t}\n \t\tif (defined $hash_base) {\n-\t\t\tif ($have_blame) {\n-\t\t\t\tprint \" | \";\n-\t\t\t}\n-\t\t\tprint $cgi->a({-href => href(action=>\"history\", hash_base=>$hash_base,\n+\t\t\tprint \" | \" .\n+\t\t\t      $cgi->a({-href => href(action=>\"history\", hash_base=>$hash_base,\n \t\t\t                             hash=>$t->{'hash'}, file_name=>\"$basedir$t->{'name'}\")},\n \t\t\t              \"history\");\n \t\t}\n@@ -1819,11 +1821,20 @@ sub git_print_tree_entry {\n \t\t              esc_html($t->{'name'}));\n \t\tprint \"</td>\\n\";\n \t\tprint \"<td class=\\\"link\\\">\";\n+\t\tprint $cgi->a({-href => href(action=>\"tree\", hash=>$t->{'hash'},\n+\t\t\t\t\t     file_name=>\"$basedir$t->{'name'}\", %base_key)},\n+\t\t\t      \"tree\");\n \t\tif (defined $hash_base) {\n-\t\t\tprint $cgi->a({-href => href(action=>\"history\", hash_base=>$hash_base,\n+\t\t\tprint \" | \" .\n+\t\t\t      $cgi->a({-href => href(action=>\"history\", hash_base=>$hash_base,\n \t\t\t                             file_name=>\"$basedir$t->{'name'}\")},\n \t\t\t              \"history\");\n \t\t}\n+\t\tif ($have_snapshot) {\n+\t\t\tprint \" | \" .\n+\t\t\t      $cgi->a({-href => href(action=>\"snapshot\", hash=>$t->{'hash'})},\n+\t\t\t              \"snapshot\");\n+\t\t}\n \t\tprint \"</td>\\n\";\n \t}\n }\n@@ -1903,6 +1914,9 @@ sub git_difftree_body {\n \t\t\t\tprint $cgi->a({-href => \"#patch$patchno\"}, \"patch\");\n \t\t\t\tprint \" | \";\n \t\t\t}\n+\t\t\tprint $cgi->a({-href => href(action=>\"blob\", hash=>$diff{'from_id'},\n+\t\t\t                             hash_base=>$parent, file_name=>$diff{'file'})},\n+\t\t\t\t      \"blob\") . \" | \";\n \t\t\tprint $cgi->a({-href => href(action=>\"blame\", hash_base=>$parent,\n \t\t\t                             file_name=>$diff{'file'})},\n \t\t\t              \"blame\") . \" | \";\n@@ -1948,6 +1962,9 @@ sub git_difftree_body {\n \t\t\t\t}\n \t\t\t\tprint \" | \";\n \t\t\t}\n+\t\t\tprint $cgi->a({-href => href(action=>\"blob\", hash=>$diff{'to_id'},\n+\t\t\t\t\t\t     hash_base=>$hash, file_name=>$diff{'file'})},\n+\t\t\t\t      \"blob\") . \" | \";\n \t\t\tprint $cgi->a({-href => href(action=>\"blame\", hash_base=>$hash,\n \t\t\t                             file_name=>$diff{'file'})},\n \t\t\t              \"blame\") . \" | \";\n@@ -1988,6 +2005,9 @@ sub git_difftree_body {\n \t\t\t\t}\n \t\t\t\tprint \" | \";\n \t\t\t}\n+\t\t\tprint $cgi->a({-href => href(action=>\"blob\", hash=>$diff{'from_id'},\n+\t\t\t\t\t\t     hash_base=>$parent, file_name=>$diff{'from_file'})},\n+\t\t\t\t      \"blob\") . \" | \";\n \t\t\tprint $cgi->a({-href => href(action=>\"blame\", hash_base=>$parent,\n \t\t\t                             file_name=>$diff{'from_file'})},\n \t\t\t              \"blame\") . \" | \";\n@@ -2155,6 +2175,7 @@ sub git_shortlog_body {\n \t\t                          href(action=>\"commit\", hash=>$commit), $ref);\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\t      $cgi->a({-href => href(action=>\"tree\", hash=>$commit, hash_base=>$commit)}, \"tree\");\n \t\tif (gitweb_have_snapshot()) {\n"},{"id":"29803","messageId":"20061024033610.7959.4028.stgit@rover","threadId":"6026","inReplyTo":"20061024031240.2500.93420.stgit@rover","subject":"[PATCH] gitweb: Restore object-named links in item lists","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-10-24T03:36:10Z","receivedAt":"2006-10-24T03:36:10Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"This restores the redundant links removed earlier. It supersedes my patch\nto stick slashes to tree entries.\n\nSorry about the previous version of the patch, an unrelated snapshot link\naddition to tree entries slipped through (and it it didn't even compile);\nI've dropped the idea of snapshot links in tree entries in the meantime\nanyway.\n\nSigned-off-by: Petr Baudis <pasky@suse.cz>\n---\n\n gitweb/gitweb.perl |   28 ++++++++++++++++++++++------\n 1 files changed, 22 insertions(+), 6 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 4a2025c..661d1dd 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -1793,16 +1793,18 @@ sub git_print_tree_entry {\n \t\t\t                       file_name=>\"$basedir$t->{'name'}\", %base_key),\n \t\t\t        -class => \"list\"}, esc_html($t->{'name'})) . \"</td>\\n\";\n \t\tprint \"<td class=\\\"link\\\">\";\n+\t\tprint $cgi->a({-href => href(action=>\"blob\", hash=>$t->{'hash'},\n+\t\t\t\t\t     file_name=>\"$basedir$t->{'name'}\", %base_key)},\n+\t\t\t      \"blob\");\n \t\tif ($have_blame) {\n-\t\t\tprint $cgi->a({-href => href(action=>\"blame\", hash=>$t->{'hash'},\n+\t\t\tprint \" | \" .\n+\t\t\t      $cgi->a({-href => href(action=>\"blame\", hash=>$t->{'hash'},\n \t\t\t\t                           file_name=>\"$basedir$t->{'name'}\", %base_key)},\n \t\t\t\t            \"blame\");\n \t\t}\n \t\tif (defined $hash_base) {\n-\t\t\tif ($have_blame) {\n-\t\t\t\tprint \" | \";\n-\t\t\t}\n-\t\t\tprint $cgi->a({-href => href(action=>\"history\", hash_base=>$hash_base,\n+\t\t\tprint \" | \" .\n+\t\t\t      $cgi->a({-href => href(action=>\"history\", hash_base=>$hash_base,\n \t\t\t                             hash=>$t->{'hash'}, file_name=>\"$basedir$t->{'name'}\")},\n \t\t\t              \"history\");\n \t\t}\n@@ -1819,8 +1821,12 @@ sub git_print_tree_entry {\n \t\t              esc_html($t->{'name'}));\n \t\tprint \"</td>\\n\";\n \t\tprint \"<td class=\\\"link\\\">\";\n+\t\tprint $cgi->a({-href => href(action=>\"tree\", hash=>$t->{'hash'},\n+\t\t\t\t\t     file_name=>\"$basedir$t->{'name'}\", %base_key)},\n+\t\t\t      \"tree\");\n \t\tif (defined $hash_base) {\n-\t\t\tprint $cgi->a({-href => href(action=>\"history\", hash_base=>$hash_base,\n+\t\t\tprint \" | \" .\n+\t\t\t      $cgi->a({-href => href(action=>\"history\", hash_base=>$hash_base,\n \t\t\t                             file_name=>\"$basedir$t->{'name'}\")},\n \t\t\t              \"history\");\n \t\t}\n@@ -1903,6 +1909,9 @@ sub git_difftree_body {\n \t\t\t\tprint $cgi->a({-href => \"#patch$patchno\"}, \"patch\");\n \t\t\t\tprint \" | \";\n \t\t\t}\n+\t\t\tprint $cgi->a({-href => href(action=>\"blob\", hash=>$diff{'from_id'},\n+\t\t\t                             hash_base=>$parent, file_name=>$diff{'file'})},\n+\t\t\t\t      \"blob\") . \" | \";\n \t\t\tprint $cgi->a({-href => href(action=>\"blame\", hash_base=>$parent,\n \t\t\t                             file_name=>$diff{'file'})},\n \t\t\t              \"blame\") . \" | \";\n@@ -1948,6 +1957,9 @@ sub git_difftree_body {\n \t\t\t\t}\n \t\t\t\tprint \" | \";\n \t\t\t}\n+\t\t\tprint $cgi->a({-href => href(action=>\"blob\", hash=>$diff{'to_id'},\n+\t\t\t\t\t\t     hash_base=>$hash, file_name=>$diff{'file'})},\n+\t\t\t\t      \"blob\") . \" | \";\n \t\t\tprint $cgi->a({-href => href(action=>\"blame\", hash_base=>$hash,\n \t\t\t                             file_name=>$diff{'file'})},\n \t\t\t              \"blame\") . \" | \";\n@@ -1988,6 +2000,9 @@ sub git_difftree_body {\n \t\t\t\t}\n \t\t\t\tprint \" | \";\n \t\t\t}\n+\t\t\tprint $cgi->a({-href => href(action=>\"blob\", hash=>$diff{'from_id'},\n+\t\t\t\t\t\t     hash_base=>$parent, file_name=>$diff{'from_file'})},\n+\t\t\t\t      \"blob\") . \" | \";\n \t\t\tprint $cgi->a({-href => href(action=>\"blame\", hash_base=>$parent,\n \t\t\t                             file_name=>$diff{'from_file'})},\n \t\t\t              \"blame\") . \" | \";\n@@ -2155,6 +2170,7 @@ sub git_shortlog_body {\n \t\t                          href(action=>\"commit\", hash=>$commit), $ref);\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\t      $cgi->a({-href => href(action=>\"tree\", hash=>$commit, hash_base=>$commit)}, \"tree\");\n \t\tif (gitweb_have_snapshot()) {\n"},{"id":"29828","messageId":"569338.82223.qm@web31805.mail.mud.yahoo.com","threadId":"6026","inReplyTo":"20061024033610.7959.4028.stgit@rover","subject":"Re: [PATCH] gitweb: Restore object-named links in item lists","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2006-10-24T08:38:34Z","receivedAt":"2006-10-24T08:38:34Z","isPatch":true,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"--- Petr Baudis <pasky@suse.cz> wrote:\n> This restores the redundant links removed earlier. It supersedes my patch\n> to stick slashes to tree entries.\n> \n> Sorry about the previous version of the patch, an unrelated snapshot link\n> addition to tree entries slipped through (and it it didn't even compile);\n> I've dropped the idea of snapshot links in tree entries in the meantime\n> anyway.\n> \n> Signed-off-by: Petr Baudis <pasky@suse.cz>\n> ---\n\nhttp://marc.theaimsgroup.com/?t=116059799500003&r=1&w=2\n\n    Luben\n\n\n> \n>  gitweb/gitweb.perl |   28 ++++++++++++++++++++++------\n>  1 files changed, 22 insertions(+), 6 deletions(-)\n> \n> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n> index 4a2025c..661d1dd 100755\n> --- a/gitweb/gitweb.perl\n> +++ b/gitweb/gitweb.perl\n> @@ -1793,16 +1793,18 @@ sub git_print_tree_entry {\n>  \t\t\t                       file_name=>\"$basedir$t->{'name'}\", %base_key),\n>  \t\t\t        -class => \"list\"}, esc_html($t->{'name'})) . \"</td>\\n\";\n>  \t\tprint \"<td class=\\\"link\\\">\";\n> +\t\tprint $cgi->a({-href => href(action=>\"blob\", hash=>$t->{'hash'},\n> +\t\t\t\t\t     file_name=>\"$basedir$t->{'name'}\", %base_key)},\n> +\t\t\t      \"blob\");\n>  \t\tif ($have_blame) {\n> -\t\t\tprint $cgi->a({-href => href(action=>\"blame\", hash=>$t->{'hash'},\n> +\t\t\tprint \" | \" .\n> +\t\t\t      $cgi->a({-href => href(action=>\"blame\", hash=>$t->{'hash'},\n>  \t\t\t\t                           file_name=>\"$basedir$t->{'name'}\", %base_key)},\n>  \t\t\t\t            \"blame\");\n>  \t\t}\n>  \t\tif (defined $hash_base) {\n> -\t\t\tif ($have_blame) {\n> -\t\t\t\tprint \" | \";\n> -\t\t\t}\n> -\t\t\tprint $cgi->a({-href => href(action=>\"history\", hash_base=>$hash_base,\n> +\t\t\tprint \" | \" .\n> +\t\t\t      $cgi->a({-href => href(action=>\"history\", hash_base=>$hash_base,\n>  \t\t\t                             hash=>$t->{'hash'}, file_name=>\"$basedir$t->{'name'}\")},\n>  \t\t\t              \"history\");\n>  \t\t}\n> @@ -1819,8 +1821,12 @@ sub git_print_tree_entry {\n>  \t\t              esc_html($t->{'name'}));\n>  \t\tprint \"</td>\\n\";\n>  \t\tprint \"<td class=\\\"link\\\">\";\n> +\t\tprint $cgi->a({-href => href(action=>\"tree\", hash=>$t->{'hash'},\n> +\t\t\t\t\t     file_name=>\"$basedir$t->{'name'}\", %base_key)},\n> +\t\t\t      \"tree\");\n>  \t\tif (defined $hash_base) {\n> -\t\t\tprint $cgi->a({-href => href(action=>\"history\", hash_base=>$hash_base,\n> +\t\t\tprint \" | \" .\n> +\t\t\t      $cgi->a({-href => href(action=>\"history\", hash_base=>$hash_base,\n>  \t\t\t                             file_name=>\"$basedir$t->{'name'}\")},\n>  \t\t\t              \"history\");\n>  \t\t}\n> @@ -1903,6 +1909,9 @@ sub git_difftree_body {\n>  \t\t\t\tprint $cgi->a({-href => \"#patch$patchno\"}, \"patch\");\n>  \t\t\t\tprint \" | \";\n>  \t\t\t}\n> +\t\t\tprint $cgi->a({-href => href(action=>\"blob\", hash=>$diff{'from_id'},\n> +\t\t\t                             hash_base=>$parent, file_name=>$diff{'file'})},\n> +\t\t\t\t      \"blob\") . \" | \";\n>  \t\t\tprint $cgi->a({-href => href(action=>\"blame\", hash_base=>$parent,\n>  \t\t\t                             file_name=>$diff{'file'})},\n>  \t\t\t              \"blame\") . \" | \";\n> @@ -1948,6 +1957,9 @@ sub git_difftree_body {\n>  \t\t\t\t}\n>  \t\t\t\tprint \" | \";\n>  \t\t\t}\n> +\t\t\tprint $cgi->a({-href => href(action=>\"blob\", hash=>$diff{'to_id'},\n> +\t\t\t\t\t\t     hash_base=>$hash, file_name=>$diff{'file'})},\n> +\t\t\t\t      \"blob\") . \" | \";\n>  \t\t\tprint $cgi->a({-href => href(action=>\"blame\", hash_base=>$hash,\n>  \t\t\t                             file_name=>$diff{'file'})},\n>  \t\t\t              \"blame\") . \" | \";\n> @@ -1988,6 +2000,9 @@ sub git_difftree_body {\n>  \t\t\t\t}\n>  \t\t\t\tprint \" | \";\n>  \t\t\t}\n> +\t\t\tprint $cgi->a({-href => href(action=>\"blob\", hash=>$diff{'from_id'},\n> +\t\t\t\t\t\t     hash_base=>$parent, file_name=>$diff{'from_file'})},\n> +\t\t\t\t      \"blob\") . \" | \";\n>  \t\t\tprint $cgi->a({-href => href(action=>\"blame\", hash_base=>$parent,\n>  \t\t\t                             file_name=>$diff{'from_file'})},\n>  \t\t\t              \"blame\") . \" | \";\n> @@ -2155,6 +2170,7 @@ sub git_shortlog_body {\n>  \t\t                          href(action=>\"commit\", hash=>$commit), $ref);\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\t      $cgi->a({-href => href(action=>\"tree\", hash=>$commit, hash_base=>$commit)}, \"tree\");\n>  \t\tif (gitweb_have_snapshot()) {\n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n> \n"},{"id":"29831","messageId":"ehkk6e$mk5$1@sea.gmane.org","threadId":"6026","inReplyTo":"20061024033610.7959.4028.stgit@rover","subject":"Re: [PATCH] gitweb: Restore object-named links in item lists","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-24T08:51:53Z","receivedAt":"2006-10-24T08:51:53Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Petr Baudis wrote:\n\n> This restores the redundant links removed earlier. It supersedes my patch\n> to stick slashes to tree entries.\n\nI would put those \"redundant links\" in separate column (like for git_tags).\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"}]}