X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gitweb%2Fgitweb.perl;h=83f810ad46cd2dfcea37308791ba64870ebfbd3c;hb=d5c527448db30be55553e0b125015e8d444f8dbc;hp=29e21564c8e7b2dd711af2e96e03b811b2c1a268;hpb=27551baa3eddc4111ceee13dc05850ae80c99a3e;p=git.git diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 29e21564c..83f810ad4 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -27,6 +27,13 @@ our $version = "++GIT_VERSION++"; our $my_url = $cgi->url(); our $my_uri = $cgi->url(-absolute => 1); +# if we're called with PATH_INFO, we have to strip that +# from the URL to find our real URL +if (my $path_info = $ENV{"PATH_INFO"}) { + $my_url =~ s,\Q$path_info\E$,,; + $my_uri =~ s,\Q$path_info\E$,,; +} + # core git executable to use # this can just be "git" if your webserver has a sensible PATH our $GIT = "++GIT_BINDIR++/git"; @@ -775,7 +782,7 @@ sub quot_cec { ); my $chr = ( (exists $es{$cntrl}) ? $es{$cntrl} - : sprintf('\%03o', ord($cntrl)) ); + : sprintf('\%2x', ord($cntrl)) ); if ($opts{-nohtml}) { return $chr; } else { @@ -2123,7 +2130,7 @@ sub parse_commit_text { last; } } - if ($co{'title'} eq "") { + if (! defined $co{'title'} || $co{'title'} eq "") { $co{'title'} = $co{'title_short'} = '(no commit message)'; } # remove added spaces @@ -4070,10 +4077,10 @@ sub git_summary { print "
description | " . esc_html($descr) . " |
owner | " . esc_html($owner) . " |
description | " . esc_html($descr) . " |
owner | " . esc_html($owner) . " |
last change | $cd{'rfc2822'} |
last change | $cd{'rfc2822'} |
$url_tag | $git_url |
$url_tag | $git_url |