summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d1d866e)
raw | patch | inline | side by side (parent: d1d866e)
author | Luben Tuikov <ltuikov@yahoo.com> | |
Thu, 28 Sep 2006 23:49:21 +0000 (16:49 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 29 Sep 2006 01:56:35 +0000 (18:56 -0700) |
Create gitweb_have_snapshot() which returns true
of snapshot is available and enabled, else false.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
of snapshot is available and enabled, else false.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 5ef4d07ca149faef52885298fdeeedbff43eec9c..97b30aa5c5eee1cf980799904977c473ac2537fe 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
return ($ctype, $suffix, $command);
}
+sub gitweb_have_snapshot {
+ my ($ctype, $suffix, $command) = gitweb_check_feature('snapshot');
+ my $have_snapshot = (defined $ctype && defined $suffix);
+
+ return $have_snapshot;
+}
+
# To enable system wide have in $GITWEB_CONFIG
# $feature{'pickaxe'}{'default'} = [1];
# To have project specific config enable override in $GITWEB_CONFIG
}
sub git_tree {
- my ($ctype, $suffix, $command) = gitweb_check_feature('snapshot');
- my $have_snapshot = (defined $ctype && defined $suffix);
+ my $have_snapshot = gitweb_have_snapshot();
if (!defined $hash) {
$hash = git_get_head_hash($project);
}
sub git_snapshot {
-
my ($ctype, $suffix, $command) = gitweb_check_feature('snapshot');
my $have_snapshot = (defined $ctype && defined $suffix);
if (!$have_snapshot) {
my $refs = git_get_references();
my $ref = format_ref_marker($refs, $co{'id'});
- my ($ctype, $suffix, $command) = gitweb_check_feature('snapshot');
- my $have_snapshot = (defined $ctype && defined $suffix);
+ my $have_snapshot = gitweb_have_snapshot();
my @views_nav = ();
if (defined $file_name && defined $co{'parent'}) {