{"thread":{"id":"3481","subject":"[PATCH] gitweb: Enable tree (directory) history display","startedAt":"2006-02-27T18:55:54Z","lastAt":"2006-02-27T19:56:07Z","messageCount":2,"participants":["Luben Tuikov","Linus Torvalds"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"16845","messageId":"20060227185554.75822.qmail@web31810.mail.mud.yahoo.com","threadId":"3481","inReplyTo":null,"subject":"[PATCH] gitweb: Enable tree (directory) history display","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2006-02-27T18:55:54Z","receivedAt":"2006-02-27T18:55:54Z","isPatch":true,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"Hi,\n\nI find this patch very useful, especially when a directory (tree) describes\na project.\n\nThis patch allows history display of whole trees/directories,\na la \"git-rev-list HEAD <dir or file>\", but somewhat\nslower, since exported git repository doesn't have\nthe files checked out so we have to use\n\"$gitbin/git-rev-list $hash | $gitbin/git-diff-tree -r --stdin \\'$file_name\\'\"\nmethod.  Maybe someone can find a speed up for this.  And better yet,\nmaybe links can be static as opposed to dynamic, so that you don't have to\nnavigate each and everytime if you want to find the history of the same\ndirectory.\n\nSigned-off-by: Luben Tuikov <ltuikov@yahoo.com>\n\n---\n\n gitweb.cgi |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\n5c8ae3db3561238a57201fcb3297f16d7b37f377\ndiff --git a/gitweb.cgi b/gitweb.cgi\nindex c1bb624..452528f 100755\n--- a/gitweb.cgi\n+++ b/gitweb.cgi\n@@ -1504,6 +1504,7 @@ sub git_tree {\n                              \"</td>\\n\" .\n                              \"<td class=\\\"link\\\">\" .\n                              $cgi->a({-href => \"$my_uri?\" .\nesc_param(\"p=$project;a=tree;h=$t_hash$base_key;f=$base$t_name\")}, \"tree\") .\n+                             \" | \" . $cgi->a({-href => \"$my_uri?\" .\nesc_param(\"p=$project;a=history;h=$hash_base;f=$base$t_name\")}, \"history\") .\n                              \"</td>\\n\";\n                }\n                print \"</tr>\\n\";\n-- \n1.2.3.g6db0\n"},{"id":"16849","messageId":"Pine.LNX.4.64.0602271154400.22647@g5.osdl.org","threadId":"3481","inReplyTo":"20060227185554.75822.qmail@web31810.mail.mud.yahoo.com","subject":"Re: [PATCH] gitweb: Enable tree (directory) history display","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-02-27T19:56:07Z","receivedAt":"2006-02-27T19:56:07Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Mon, 27 Feb 2006, Luben Tuikov wrote:\n> \n> This patch allows history display of whole trees/directories,\n> a la \"git-rev-list HEAD <dir or file>\", but somewhat\n> slower, since exported git repository doesn't have\n> the files checked out so we have to use\n> \"$gitbin/git-rev-list $hash | $gitbin/git-diff-tree -r --stdin \\'$file_name\\'\"\n\nNo no. \n\nJust use \n\n\tgit-rev-list $hash -- $file_name\n\nwhere the \"--\" is the important part.\n\nAs a usability-enhancer, you can leave out the \"--\" to separate filenames \nand other things, but when you leave out the \"--\", git requires that the \nfilenames exist.\n\n\t\tLinus\n"}]}