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

[PATCH] Show snapshot link in shortlog only if have_snapsho

From
Petr Baudis <pasky@suse.cz>
Date
Oct 6, 2006, 13:57 UTC
Message-ID
<20061006135752.26493.63501.stgit@rover>
In-Reply-To
<eft97f$un0$3@sea.gmane.org>
Signed-off-by: Petr Baudis <pasky@suse.cz>
---
 gitweb/gitweb.perl |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
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";
 	}
Previous: Jakub Narebski
Message 3 of 3 in “gitweb: Add snapshot to shortlog”
  1. gitweb: Add snapshot to shortlogLuben Tuikov, Sep 28, 2006
  2. Jakub NarebskiOct 3, 2006
  3. Show snapshot link in shortlog only if have_snapshoPetr Baudis, Oct 6, 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.