threads / patch / 5752

patchgitweb: Add snapshot to shortlog

Subject: [PATCH] gitweb: Add snapshot to shortlog

## tl;dr

3 messages between Sep 28, 2006 and Oct 6, 2006. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

Luben Tuikov· Sep 28, 2006, 23:50 UTC · lore
Add snapshot to each commit-row of shortlog.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
---
 gitweb/gitweb.perl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Show changes to gitweb/gitweb.perl +2 −1
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a2f07cc..953a0ef 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2021,7 +2021,8 @@ sub git_shortlog_body {
 		print "</td>\n" .
 		      "<td class=\"link\">" .
 		      $cgi->a({-href => href(action=>"commitdiff", hash=>$commit)}, "commitdiff") . " | " .
-		      $cgi->a({-href => href(action=>"tree", hash=>$commit, hash_base=>$commit)}, "tree");
+		      $cgi->a({-href => href(action=>"tree", hash=>$commit, hash_base=>$commit)}, "tree") . " | " .
+		      $cgi->a({-href => href(action=>"snapshot", hash=>$commit)}, "snapshot");
 		print "</td>\n" .
 		      "</tr>\n";
 	}
-- 
1.4.2.1.g05f0f
Jakub Narebski· Oct 3, 2006, 09:07 UTC · re: Luben Tuikov · lore

Re: [PATCH] gitweb: Add snapshot to shortlog

Luben Tuikov wrote:
> Add snapshot to each commit-row of shortlog.
You should add it conditionally, checking for gitweb_have_snapshot.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Petr Baudis· Oct 6, 2006, 13:57 UTC · re: Jakub Narebski · lore

[PATCH] Show snapshot link in shortlog only if have_snapsho

Signed-off-by: Petr Baudis <pasky@suse.cz>
---
 gitweb/gitweb.perl |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
Show changes to gitweb/gitweb.perl +4 −2
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 5c7d95b..bcb41cc 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2098,8 +2098,10 @@ sub git_shortlog_body {
 		print "</td>\n" .
 		      "<td class=\"link\">" .
 		      $cgi->a({-href => href(action=>"commitdiff", hash=>$commit)}, "commitdiff") . " | " .
-		      $cgi->a({-href => href(action=>"tree", hash=>$commit, hash_base=>$commit)}, "tree") . " | " .
-		      $cgi->a({-href => href(action=>"snapshot", hash=>$commit)}, "snapshot");
+		      $cgi->a({-href => href(action=>"tree", hash=>$commit, hash_base=>$commit)}, "tree");
+		if (gitweb_have_snapshot()) {
+			print " | " . $cgi->a({-href => href(action=>"snapshot", hash=>$commit)}, "snapshot");
+		}
 		print "</td>\n" .
 		      "</tr>\n";
 	}

← back to recent threads