From: Martin Waitz Date: Wed, 16 Aug 2006 22:28:39 +0000 (+0200) Subject: gitweb: support for / as home_link. X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/42fcf7c089492207a1e5e4099abf3ca5745b20d2317b67d615979c5ad37c7090 gitweb: support for / as home_link. 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 Signed-off-by: Junio C Hamano --- diff --git a/gitweb.perl b/gitweb.perl index a0a7e80..3b0ace2 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -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++";