From: Petr Baudis <pasky@suse.cz>
To: Junio C Hamano <junkio@cox.net>
Cc: <git@vger.kernel.org>
Subject: [PATCH 1/2] gitweb: Show snapshot links for tree entries in tree listing
Date: Sat, 07 Oct 2006 16:10:41 +0200 [thread overview]
Message-ID: <20061007141040.16912.50717.stgit@rover> (raw)
In-Reply-To: <20061007132457.GB20017@pasky.or.cz>
Currently that's inconsistently reachable only by first displaying the
tree.
Signed-off-by: Petr Baudis <pasky@suse.cz>
---
gitweb/gitweb.perl | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index c4970f4..096a01b 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1752,7 +1752,7 @@ sub git_print_simplified_log {
# print tree entry (row of git_tree), but without encompassing <tr> element
sub git_print_tree_entry {
- my ($t, $basedir, $hash_base, $have_blame) = @_;
+ my ($t, $basedir, $hash_base, $have_blame, $have_snapshot) = @_;
my %base_key = ();
$base_key{hash_base} = $hash_base if defined $hash_base;
@@ -1798,6 +1798,13 @@ sub git_print_tree_entry {
print $cgi->a({-href => href(action=>"history", hash_base=>$hash_base,
file_name=>"$basedir$t->{'name'}")},
"history");
+ if ($have_snapshot) {
+ print " | ";
+ }
+ }
+ if ($have_snapshot) {
+ print $cgi->a({-href => href(action=>"snapshot", hash=>$t->{'hash'})},
+ "snapshot");
}
print "</td>\n";
}
@@ -2931,7 +2938,7 @@ sub git_tree {
}
$alternate ^= 1;
- git_print_tree_entry(\%t, $base, $hash_base, $have_blame);
+ git_print_tree_entry(\%t, $base, $hash_base, $have_blame, $have_snapshot);
print "</tr>\n";
}
next prev parent reply other threads:[~2006-10-07 14:10 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-05 19:22 [PATCH] gitweb: Do not print "log" and "shortlog" redundantly in commit view Luben Tuikov
2006-10-06 7:44 ` Jakub Narebski
2006-10-06 16:35 ` Petr Baudis
2006-10-06 22:16 ` Luben Tuikov
2006-10-07 13:24 ` Petr Baudis
2006-10-07 14:05 ` Jakub Narebski
2006-10-07 14:17 ` Petr Baudis
2006-10-07 14:10 ` Petr Baudis [this message]
2006-10-07 18:37 ` [PATCH 1/2] gitweb: Show snapshot links for tree entries in tree listing Luben Tuikov
2006-10-07 18:41 ` Petr Baudis
2006-10-07 18:52 ` Luben Tuikov
2006-10-07 19:15 ` Petr Baudis
2006-10-07 22:31 ` Junio C Hamano
2006-10-08 1:04 ` Luben Tuikov
2006-10-07 14:10 ` [PATCH 2/2] gitweb: Show trailing slash when listing tree entry " Petr Baudis
2006-10-07 18:44 ` Luben Tuikov
2006-10-07 19:06 ` Jakub Narebski
2006-10-07 19:12 ` Petr Baudis
2006-10-07 20:38 ` Jakub Narebski
2006-10-07 21:15 ` Petr Baudis
2006-10-07 21:27 ` Jakub Narebski
2006-10-09 20:55 ` Petr Baudis
2006-10-09 22:52 ` Junio C Hamano
2006-10-10 5:10 ` Junio C Hamano
2006-10-10 5:38 ` Luben Tuikov
2006-10-10 5:46 ` Junio C Hamano
2006-10-10 6:34 ` Luben Tuikov
2006-10-10 5:46 ` Jeff King
2006-10-10 6:41 ` Luben Tuikov
2006-10-10 6:58 ` Jeff King
2006-10-10 9:15 ` Jakub Narebski
2006-10-10 19:19 ` Luben Tuikov
2006-10-10 19:57 ` Junio C Hamano
2006-10-10 20:31 ` Jakub Narebski
2006-10-10 21:02 ` Luben Tuikov
2006-10-10 21:13 ` Jakub Narebski
2006-10-10 22:18 ` Luben Tuikov
2006-10-10 20:52 ` Luben Tuikov
2006-10-10 21:00 ` Jakub Narebski
2006-10-10 22:14 ` Luben Tuikov
2006-10-10 22:40 ` Jakub Narebski
2006-10-10 20:29 ` Jakub Narebski
2006-10-11 15:35 ` Andreas Ericsson
2006-10-10 6:21 ` Luben Tuikov
2006-10-10 7:05 ` Jeff King
2006-10-10 8:07 ` Andreas Ericsson
2006-10-10 13:14 ` Josef Weidendorfer
2006-10-10 18:23 ` Luben Tuikov
2006-10-10 18:52 ` Josef Weidendorfer
2006-10-10 18:50 ` Luben Tuikov
2006-10-10 8:28 ` Junio C Hamano
2006-10-07 21:31 ` A Large Angry SCM
2006-10-07 22:34 ` Junio C Hamano
2006-10-08 1:16 ` Luben Tuikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061007141040.16912.50717.stgit@rover \
--to=pasky@suse.cz \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).