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

Re[2]: [PATCH 1/5] git-svn: fix occasional "Failed to strip path" error on fetch next commit, try #3

From
IBIlya Basin <basinilya@gmail.com>
Date
Apr 30, 2013, 20:10 UTC
Message-ID
<1285665433.20130501001028@gmail.com>
In-Reply-To
<7vobcvdec2.fsf@alter.siamese.dyndns.org>
Show 15 quoted lines
>>  }
>>  
>> @@ -458,9 +459,12 @@ sub find_empty_directories {
>>               my $skip_added = 0;
>>               foreach my $t (qw/dir_prop file_prop/) {
>>                       foreach my $path (keys %{ $self->{$t} }) {
>> -                             if (exists $self->{$t}->{dirname($path)}) {
>> -                                     $skip_added = 1;
>> -                                     last;
>> +                             if (length $self->git_path($path)) {
>> +                                     $path = dirname($path);
>> +                                     if ($dir eq $self->git_path($path) && exists $self->{$t}->{$path}) {
>> +                                             $skip_added = 1;
>> +                                             last;
>> +                                     }

JCH> I am reading that this is a solution for your second issue (use JCH> git_path() to convert $path). An empty $path would be a top-level JCH> and skipping it corresponds to the "next if $dir eq '.'" at the JCH> beginning of the loop, I guess.

JCH> When "$dir ne $self->git_path(dirname($path))", what should happen?

'ls-tree' will be executed. I guess, the original idea was to save processes, although I don't know why the dir is in @deleted_gpath, if it has children.

Previous: Junio C Hamano
Message 3 of 3 in “git-svn: fix occasional "Failed to strip path" error on fetch next commit, try #3”
  1. 1/5 git-svn: fix occasional "Failed to strip path" error on fetch next commit, try #3Ilya Basin, Apr 28, 2013
  2. Junio C HamanoApr 30, 2013
  3. Re[2]: [PATCH 1/5] git-svn: fix occasional "Failed to strip path" error on fetch next commit, try #3Ilya Basin, Apr 30, 2013

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.