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

Re: git_get_projects_list and $projects_list

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 31, 2006, 12:23 UTC
Message-ID
<ei7f7o$bgi$1@sea.gmane.org>
In-Reply-To
<ei7dq4$828$1@sea.gmane.org>
Jakub Narebski wrote:
Show 12 quoted lines
> Aneesh Kumar wrote:
> 
>> Ok if i have
>> 
>> $projects_list = "/a/git////" ==> ending "/" . the function will fail
>> at check_export_ok()
>> 
>> That is because we get the $pfxlen wrong. We should ignore all the trailing "/"
>> my $subdir = substr($File::Find::name, $pfxlen + 1);
> 
> Perhaps it would be enough to just add 
>         $dir =~ s!/+$//; 
Ooops, it should of course be
        $dir =~ s!/+$!!;
> before  
>         my $pfxlen = length("$dir");
> (or something equivalent). Try it and send us a patch.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Jakub NarebskiNext: Aneesh Kumar
Message 3 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.