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

Re: git_get_projects_list and $projects_list

From
Aneesh Kumar <aneesh.kumar@gmail.com>
Date
Nov 2, 2006, 04:13 UTC
Message-ID
<cc723f590611012013v1359efb9qdb5888fc458da22@mail.gmail.com>
In-Reply-To
<ei7f7o$bgi$1@sea.gmane.org>
On 10/31/06, Jakub Narebski <jnareb@gmail.com> wrote:
>         $dir =~ s!/+$!!;
>
That works. Attaching the diff below
-aneesh
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index bf5f829..4343450 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -897,6 +897,8 @@ sub git_get_projects_list {
 	if (-d $projects_list) {
 		# search in directory
 		my $dir = $projects_list;
+		# remove the trailing "/"
+		$dir =~ s!/+$!!;
 		my $pfxlen = length("$dir");
 
 		File::Find::find({
Previous: Jakub Narebski
Message 4 of 4 in “git_get_projects_list and $projects_list”
  1. Aneesh KumarOct 31, 2006
  2. Jakub NarebskiOct 31, 2006
  3. Jakub NarebskiOct 31, 2006
  4. Aneesh KumarNov 2, 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.