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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>  }
>>  
>> @@ -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.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]