git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitweb: fix display of trees via PATH_INFO.

From
Martin Waitz <tali@admingilde.org>
Date
Sep 21, 2006, 07:48 UTC
Message-ID
<20060921074821.GG31940@admingilde.org>

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 <tali@admingilde.org>
---
 gitweb/gitweb.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index baadbe7..ea57717 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -300,6 +300,7 @@ sub evaluate_path_info {
 		$pathname =~ s,^/+,,;
 		if (!$pathname || substr($pathname, -1) eq "/") {
 			$action  ||= "tree";
+			$pathname =~ s,/$,,;
 		} else {
 			$action  ||= "blob_plain";
 		}
-- 
1.4.2.gb8b6b

-- 
Martin Waitz
Next: Jakub Narebski
Message 1 of 2 in “gitweb: fix display of trees via PATH_INFO.”
  1. gitweb: fix display of trees via PATH_INFO.Martin Waitz, Sep 21, 2006
  2. Jakub NarebskiSep 21, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.