Re: [PATCH 1/2] gitweb: Show snapshot links for tree entries in tree listing
- From
- Luben Tuikov <ltuikov@yahoo.com>
- Date
- Oct 7, 2006, 18:37 UTC
- Message-ID
- <20061007183702.40162.qmail@web31802.mail.mud.yahoo.com>
- In-Reply-To
- <20061007141040.16912.50717.stgit@rover>
--- Petr Baudis <pasky@suse.cz> wrote:
> Currently that's inconsistently reachable only by first displaying the > tree.
I cannot say that there is any "inconsistency" there per se. I also fail to see the value of this patch.
It looks like it just adds interface to gitweb, just because "we can" and "gitweb can do it".
Luben
Show 48 quoted lines
>
> 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";
> }
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>