gitweb: fix display of trees via PATH_INFO.
PATCH 1/1 gitweb: fix display of trees via PATH_INFO.
When adding a / to the URL, git should display the corresponding tree object, but it has to remove the / first.
Signed-off-by Martin Waitz <[email protected]>
--- gitweb/gitweb.perl | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
gitweb/gitweb.perl +1 -0
@@ -300,6 +300,7 @@ sub evaluate_path_info { $pathname =~ s,^/+,,; if (!$pathname || substr($pathname, -1) eq "/") { $action ||= "tree"; + $pathname =~ s,/$,,; } else { $action ||= "blob_plain"; }
Signature · 4 lines
1.4.2.gb8b6b -- Martin Waitz
Quoted 2 lines · Martin Waitz
When adding a / to the URL, git should display the corresponding tree object, but it has to remove the / first.
Hmm... I thought that gitweb works just fine with file_name ('f') parameter with trailing '/'... I guessed wrong.
By the way, we should fix error when we try to "tree" display blob, or "blob" display tree.
Signature · 3 lines
Jakub Narebski Warsaw, Poland ShadeHawk on #git