All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilya Basin <basinilya@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git mailing list <git@vger.kernel.org>,
	Ray Chen <rchen@cs.umd.edu>, Eric Wong <normalperson@yhbt.net>
Subject: Re[2]: [PATCH 1/5] git-svn: fix occasional "Failed to strip path" error on fetch next commit, try #3
Date: Wed, 1 May 2013 00:10:28 +0400	[thread overview]
Message-ID: <1285665433.20130501001028@gmail.com> (raw)
In-Reply-To: <7vobcvdec2.fsf@alter.siamese.dyndns.org>

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

      reply	other threads:[~2013-04-30 20:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-28 20:10 [PATCH 1/5] git-svn: fix occasional "Failed to strip path" error on fetch next commit, try #3 Ilya Basin
2013-04-30 19:10 ` Junio C Hamano
2013-04-30 20:10   ` Ilya Basin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1285665433.20130501001028@gmail.com \
    --to=basinilya@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=normalperson@yhbt.net \
    --cc=rchen@cs.umd.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.