{"thread":{"id":"5727","subject":"[PATCH] gitweb: Add history and blame to git_difftree_body()","startedAt":"2006-09-28T00:24:49Z","lastAt":"2006-10-02T19:55:23Z","messageCount":4,"participants":["Luben Tuikov","Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"27840","messageId":"20060928002449.64051.qmail@web31802.mail.mud.yahoo.com","threadId":"5727","inReplyTo":null,"subject":"[PATCH] gitweb: Add history and blame to git_difftree_body()","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2006-09-28T00:24:49Z","receivedAt":"2006-09-28T00:24:49Z","isPatch":true,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"Add blame and history to Deleted files.\nAdd blame and history to Modified or Type changed files.\nAdd blame and history to Renamed or Copied files.\n\nThis allows us to do\n\tblame->commit->blame->commit->blame->...\ninstead of\n\tblame->commit->file->blame->commit->file->blame->...\nwhich is longer and easier to get wrong.\n\nSigned-off-by: Luben Tuikov <ltuikov@yahoo.com>\n---\n gitweb/gitweb.perl |   35 +++++++++++++++++++++++------------\n 1 files changed, 23 insertions(+), 12 deletions(-)\n\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex c87f60e..f772fa3 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -1721,9 +1721,12 @@ 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=>\"blame\", hash_base=>$parent,\n+\t\t\t\t\t\t     file_name=>$diff{'file'})},\n+\t\t\t\t      \"blame\") . \" | \";\n \t\t\tprint $cgi->a({-href => href(action=>\"history\", hash_base=>$parent,\n-\t\t\t                             file_name=>$diff{'file'})},\n-\t\t\t              \"history\");\n+\t\t\t\t\t\t     file_name=>$diff{'file'})},\n+\t\t\t\t      \"history\");\n \t\t\tprint \"</td>\\n\";\n \n \t\t} elsif ($diff{'status'} eq \"M\" || $diff{'status'} eq \"T\") { # modified, or type changed\n@@ -1763,8 +1766,11 @@ 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=>\"history\",\n-\t\t\t\t\t\t     hash_base=>$hash, file_name=>$diff{'file'})},\n+\t\t\tprint $cgi->a({-href => href(action=>\"blame\", hash_base=>$hash,\n+\t\t\t\t\t\t     file_name=>$diff{'file'})},\n+\t\t\t\t      \"blame\") . \" | \";\n+\t\t\tprint $cgi->a({-href => href(action=>\"history\", hash_base=>$hash,\n+\t\t\t\t\t\t     file_name=>$diff{'file'})},\n \t\t\t\t      \"history\");\n \t\t\tprint \"</td>\\n\";\n \n@@ -1790,17 +1796,22 @@ sub git_difftree_body {\n \t\t\t\tif ($action eq 'commitdiff') {\n \t\t\t\t\t# link to patch\n \t\t\t\t\t$patchno++;\n-\t\t\t\t\tprint \" | \" .\n-\t\t\t\t\t\t$cgi->a({-href => \"#patch$patchno\"}, \"patch\");\n+\t\t\t\t\tprint $cgi->a({-href => \"#patch$patchno\"}, \"patch\");\n \t\t\t\t} else {\n-\t\t\t\t\tprint \" | \" .\n-\t\t\t\t\t\t$cgi->a({-href => href(action=>\"blobdiff\",\n-\t\t\t\t\t\t                       hash=>$diff{'to_id'}, hash_parent=>$diff{'from_id'},\n-\t\t\t\t\t\t                       hash_base=>$hash, hash_parent_base=>$parent,\n-\t\t\t\t\t\t                       file_name=>$diff{'to_file'}, file_parent=>$diff{'from_file'})},\n-\t\t\t\t\t\t        \"diff\");\n+\t\t\t\t\tprint $cgi->a({-href => href(action=>\"blobdiff\",\n+\t\t\t\t\t\t\t\t     hash=>$diff{'to_id'}, hash_parent=>$diff{'from_id'},\n+\t\t\t\t\t\t\t\t     hash_base=>$hash, hash_parent_base=>$parent,\n+\t\t\t\t\t\t\t\t     file_name=>$diff{'to_file'}, file_parent=>$diff{'from_file'})},\n+\t\t\t\t\t\t      \"diff\");\n \t\t\t\t}\n+\t\t\t\tprint \" | \";\n \t\t\t}\n+\t\t\tprint $cgi->a({-href => href(action=>\"blame\", hash_base=>$parent,\n+\t\t\t\t\t\t     file_name=>$diff{'from_file'})},\n+\t\t\t\t      \"blame\") . \" | \";\n+\t\t\tprint $cgi->a({-href => href(action=>\"history\", hash_base=>$parent,\n+\t\t\t\t\t\t     file_name=>$diff{'from_file'})},\n+\t\t\t\t      \"history\");\n \t\t\tprint \"</td>\\n\";\n \n \t\t} # we should not encounter Unmerged (U) or Unknown (X) status\n-- \n1.4.2.1.g271e\n\n"},{"id":"28065","messageId":"efor2e$d0i$1@sea.gmane.org","threadId":"5727","inReplyTo":"20060928002449.64051.qmail@web31802.mail.mud.yahoo.com","subject":"Re: [PATCH] gitweb: Add history and blame to git_difftree_body()","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-01T16:41:05Z","receivedAt":"2006-10-01T16:41:05Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Luben Tuikov wrote:\n\n> Add blame and history to Deleted files.\n> Add blame and history to Modified or Type changed files.\n> Add blame and history to Renamed or Copied files.\n\nBlame has to be added conditionally (gitweb_have_blame).\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"28114","messageId":"20061002193217.86165.qmail@web31814.mail.mud.yahoo.com","threadId":"5727","inReplyTo":"efor2e$d0i$1@sea.gmane.org","subject":"Re: [PATCH] gitweb: Add history and blame to git_difftree_body()","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2006-10-02T19:32:17Z","receivedAt":"2006-10-02T19:32:17Z","isPatch":true,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"--- Jakub Narebski <jnareb@gmail.com> wrote:\n> Luben Tuikov wrote:\n> \n> > Add blame and history to Deleted files.\n> > Add blame and history to Modified or Type changed files.\n> > Add blame and history to Renamed or Copied files.\n> \n> Blame has to be added conditionally (gitweb_have_blame).\n\nCan you please not edit the CC field when you reply?\nI can see that only the GIT mailing list was left,\nbut my email had been removed.\n\nThanks,\n   Luben\n"},{"id":"28118","messageId":"200610022155.24487.jnareb@gmail.com","threadId":"5727","inReplyTo":"20061002193217.86165.qmail@web31814.mail.mud.yahoo.com","subject":"Re: [PATCH] gitweb: Add history and blame to git_difftree_body()","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-02T19:55:23Z","receivedAt":"2006-10-02T19:55:23Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Luben Tuikov wrote:\n> --- Jakub Narebski <jnareb@gmail.com> wrote:\n> > Luben Tuikov wrote:\n> > \n> > > Add blame and history to Deleted files.\n> > > Add blame and history to Modified or Type changed files.\n> > > Add blame and history to Renamed or Copied files.\n> > \n> > Blame has to be added conditionally (gitweb_have_blame).\n> \n> Can you please not edit the CC field when you reply?\nI do not edit Cc: field. I reply via GMane NNTP (Usenet)\ninterface.\n\n> I can see that only the GIT mailing list was left,\n> but my email had been removed.\nIt was not removed, it was not added.\n\n-- \nJakub Narebski\nPoland\n"}]}