summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorYasushi SHOJI <yashi@atmark-techno.com>2006-08-14 22:50:49 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-08-15 01:09:33 (GMT)
commit2de21fac9842650fceb3db68f15711e38fabc3c8 (patch)
tree2b74eaabec1f70f451c4e310b6876d5df30368e3 /gitweb
parent4a4a1a53d1c4a272d4cf0d53116896d057174671 (diff)
downloadgit-2de21fac9842650fceb3db68f15711e38fabc3c8.zip
git-2de21fac9842650fceb3db68f15711e38fabc3c8.tar.gz
git-2de21fac9842650fceb3db68f15711e38fabc3c8.tar.bz2
gitweb: configurable home link string
I've always found difficult to figure out git URL for clone from gitweb URL because git:// and http:// are different on many site including kernel.org. I've found this enhancement at http://dev.laptop.org/git when I was on git channel, and thought that it'd be nice if all public gitweb site show it's git URL on its page. This patch allow us to change the home link string. The current default is "projects" as we all see on gitweb now. ie. kernel.org might set this variable to "git://git.kernel.org/pub/scm/" Signed-off-by: Yasushi SHOJI <yashi@atmark-techno.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl5
1 files changed, 4 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index ab28caa..b5b89de 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -36,6 +36,9 @@ our $git_temp = "/tmp/gitweb";
# target of the home link on top of all pages
our $home_link = $my_uri;
+# string of the home link on top of all pages
+our $home_link_str = "++GITWEB_HOME_LINK_STR++";
+
# name of your site or organization to appear in page titles
# replace this with something more descriptive for clearer bookmarks
our $site_name = "++GITWEB_SITENAME++" || $ENV{'SERVER_NAME'} || "Untitled";
@@ -974,7 +977,7 @@ EOF
"<a href=\"http://www.kernel.org/pub/software/scm/git/docs/\" title=\"git documentation\">" .
"<img src=\"$logo\" width=\"72\" height=\"27\" alt=\"git\" style=\"float:right; border-width:0px;\"/>" .
"</a>\n";
- print $cgi->a({-href => esc_param($home_link)}, "projects") . " / ";
+ print $cgi->a({-href => esc_param($home_link)}, $home_link_str) . " / ";
if (defined $project) {
print $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=summary")}, esc_html($project));
if (defined $action) {