From 54f9db63af637ddc0e35adc0fdd3665c20e0a277 Mon Sep 17 00:00:00 2001 From: Ortwin Escher Date: Thu, 28 Jan 2010 16:03:01 +0100 Subject: [PATCH] Fixed the new deletion method. Deleting /a/path will delete /a/path/* also and not /a/pathtoo MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Love Hörnquist Åstrand --- git2svn | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/git2svn b/git2svn index acad69b..f6e17fe 100755 --- a/git2svn +++ b/git2svn @@ -346,8 +346,9 @@ COMMAND: while (!eof(IN)) { die "file was a dir"; } elsif (($paths{$path} != 2) && ($type == 0120000)) { print STDERR "Dir is now a symlink, deleting: $path\n" if ($verbose); + delete $paths{$path}; foreach ( keys( %paths ) ) { - delete $paths{$_} if ( /^$path/ ); + delete $paths{$_} if ( /^$path\// ); } # This is now a file and not a path anymore $paths{$path} = 2; @@ -392,8 +393,9 @@ COMMAND: while (!eof(IN)) { my $path = $basedir . "/". $1; if ($paths{$path}) { + delete $paths{$path}; foreach ( keys( %paths ) ) { - delete $paths{$_} if ( /^$path/ ); + delete $paths{$_} if ( /^$path\// ); } printf OUT "Node-path: $path\n"; -- 2.11.4.GIT