]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: support for / as home_link.
authorMartin Waitz <redacted>
Wed, 16 Aug 2006 22:28:39 +0000 (00:28 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:10 +0000 (00:07 -0400)
If the webserver is configured to use gitweb even for the root directory
of the site, then my_uri is empty which leads to a non-functional home
link.  Fix that by defaulting to "/" in this case.

Signed-off-by: Martin Waitz <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index a0a7e80899da5539c8580f485a1c9e2cf921572f877fe425be7265752262c60d..3b0ace2e7e50b264bb20f8ea08e9c85f2024de71e45113a1912490f4d56f045d 100755 (executable)
@@ -34,7 +34,7 @@ our $projectroot = "++GITWEB_PROJECTROOT++";
 our $git_temp = "/tmp/gitweb";
 
 # target of the home link on top of all pages
-our $home_link = $my_uri;
+our $home_link = $my_uri || "/";
 
 # string of the home link on top of all pages
 our $home_link_str = "++GITWEB_HOME_LINK_STR++";
This page took 0.227104 seconds and 4 git commands to generate.