diff --git a/commit-patch b/commit-patch index 79bd581..ac490bf 100755 --- a/commit-patch +++ b/commit-patch @@ -234,7 +234,7 @@ $SIG{PIPE} = $SIG{INT} = $SIG{QUIT} = sub { print "Cleanly aborting..\n"; }; my ($out, $working_patch, $non_committed_patch); run([split(/ /,$vc{diff}), @changed, @removed], '>', \$working_patch, '2>', \$err);# CVS diff dies. Sigh. or die "$err\n"; -unless ($working_patch =~ /^\s*$/s) { +unless ($working_patch =~ /^(#[^\n]*|\s)*$/s) { run(["interdiff", $vc{patcharg}, $patch, '-'], '<', \$working_patch, '>', \$non_committed_patch, '2>', \$err) or die "$err\n"; run(["patch", $vc{patcharg}, "-R"], '<', \$working_patch, '>', \$out, '2>', \$err) or die "$out\n$err\n";