From 581d96f30b655434dfa8cda9e63327c8b5fdc3a6 Mon Sep 17 00:00:00 2001 From: David Caldwell Date: Wed, 15 May 2013 15:29:48 -0700 Subject: [PATCH] [commit-patch] Need to delete "added" files so that the reverse patch can create them. --- commit-patch | 1 + 1 file changed, 1 insertion(+) diff --git a/commit-patch b/commit-patch index 37636de..1faf94b 100755 --- a/commit-patch +++ b/commit-patch @@ -229,6 +229,7 @@ die "No files in patch" unless scalar %lsdiff; for my $f (@changed, @added, @removed) { run ["cp", "-f", $f, "$f.orig.$$"] or die "couldn't make backup of $f: $!" if -f $f; $clean{"$f.orig.$$"} = $f; + unlink $f if grep { $_ eq $f } @added; # Needs to be gone so patch can create it } $SIG{PIPE} = $SIG{INT} = $SIG{QUIT} = sub { print "Cleanly aborting..\n"; }; -- 2.51.2