git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitweb: Enable tree (directory) history display
@ 2006-02-27 18:55 Luben Tuikov
  2006-02-27 19:56 ` Linus Torvalds
  0 siblings, 1 reply; 2+ messages in thread
From: Luben Tuikov @ 2006-02-27 18:55 UTC (permalink / raw)
  To: git

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gitweb: Enable tree (directory) history display
  2006-02-27 18:55 [PATCH] gitweb: Enable tree (directory) history display Luben Tuikov
@ 2006-02-27 19:56 ` Linus Torvalds
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Torvalds @ 2006-02-27 19:56 UTC (permalink / raw)
  To: Luben Tuikov; +Cc: git



On Mon, 27 Feb 2006, Luben Tuikov wrote:
> 
> 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\'"

No no. 

Just use 

	git-rev-list $hash -- $file_name

where the "--" is the important part.

As a usability-enhancer, you can leave out the "--" to separate filenames 
and other things, but when you leave out the "--", git requires that the 
filenames exist.

		Linus

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-27 19:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-27 18:55 [PATCH] gitweb: Enable tree (directory) history display Luben Tuikov
2006-02-27 19:56 ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).