# [PATCH] gitweb: Add snapshot to shortlog

3 messages from 2006-09-28 to 2006-10-06. Participants: Luben Tuikov, Jakub Narebski, Petr Baudis.
Thread: https://gitlist.dev/t/5752

## Luben Tuikov, 2006-09-28 23:50

Subject: [PATCH] gitweb: Add snapshot to shortlog
Message-ID: <20060928235009.92537.qmail@web31811.mail.mud.yahoo.com>
URL: https://gitlist.dev/e/20060928235009.92537.qmail%40web31811.mail.mud.yahoo.com

```
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(-)


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, 2006-10-03 09:07

Subject: Re: [PATCH] gitweb: Add snapshot to shortlog
Message-ID: <eft97f$un0$3@sea.gmane.org>
URL: https://gitlist.dev/e/eft97f%24un0%243%40sea.gmane.org
In-Reply-To: <20060928235009.92537.qmail@web31811.mail.mud.yahoo.com>

```
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, 2006-10-06 13:57

Subject: [PATCH] Show snapshot link in shortlog only if have_snapsho
Message-ID: <20061006135752.26493.63501.stgit@rover>
URL: https://gitlist.dev/e/20061006135752.26493.63501.stgit%40rover
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";
 	}

```
