git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitweb: Enable tree (directory) history display

From
LTLuben Tuikov <ltuikov@yahoo.com>
Date
Feb 27, 2006, 18:55 UTC
Message-ID
<20060227185554.75822.qmail@web31810.mail.mud.yahoo.com>
Hi,

I find this patch very useful, especially when a directory (tree) describes a project.

This patch allows history display of whole trees/directories, a la "git-rev-list HEAD <dir or file>", but somewhat slower, since exported git repository doesn't have the files checked out so we have to use "$gitbin/git-rev-list $hash | $gitbin/git-diff-tree -r --stdin \'$file_name\'" method. Maybe someone can find a speed up for this. And better yet, maybe links can be static as opposed to dynamic, so that you don't have to navigate each and everytime if you want to find the history of the same directory.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
---
 gitweb.cgi |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
5c8ae3db3561238a57201fcb3297f16d7b37f377
diff --git a/gitweb.cgi b/gitweb.cgi
index c1bb624..452528f 100755
--- a/gitweb.cgi
+++ b/gitweb.cgi
@@ -1504,6 +1504,7 @@ sub git_tree {
                              "</td>\n" .
                              "<td class=\"link\">" .
                              $cgi->a({-href => "$my_uri?" .
esc_param("p=$project;a=tree;h=$t_hash$base_key;f=$base$t_name")}, "tree") .
+                             " | " . $cgi->a({-href => "$my_uri?" .
esc_param("p=$project;a=history;h=$hash_base;f=$base$t_name")}, "history") .
                              "</td>\n";
                }
                print "</tr>\n";
-- 
1.2.3.g6db0
Next: Linus Torvalds
Message 1 of 2 in “gitweb: Enable tree (directory) history display”
  1. gitweb: Enable tree (directory) history displayLuben Tuikov, Feb 27, 2006
  2. Linus TorvaldsFeb 27, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.