diff options
author | Jean Delvare <jdelvare@suse.de> | 2012-12-18 18:14:43 +0100 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2012-12-18 18:14:43 +0100 |
commit | 564b2af4cdd2d6c7e3d18dbb57609520ef3f5e85 (patch) | |
tree | 8d9ef048108d9557894445e83357681bd49398d0 | |
parent | 5c1fda67244d1d516e12e757c0c09e729c0b73aa (diff) | |
download | quilt-564b2af4cdd2d6c7e3d18dbb57609520ef3f5e85.tar.gz |
remove-trailing-ws: Undefine $file at the end of every file
It should make no difference if the parser is right, but will make it
easier to spot bugs in said parser.
-rw-r--r-- | quilt/scripts/remove-trailing-ws.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/quilt/scripts/remove-trailing-ws.in b/quilt/scripts/remove-trailing-ws.in index 9e40707..a388314 100644 --- a/quilt/scripts/remove-trailing-ws.in +++ b/quilt/scripts/remove-trailing-ws.in @@ -48,6 +48,7 @@ while (<>) { print unless $opt_n; if (/^--- ./) { # unified diff + $file = undef; while (<>) { print unless $opt_n; if (/^\+\+\+ (.+?)(?:[ \t][^\t]*)?$/) { @@ -81,6 +82,7 @@ while (<>) { } } elsif (/^\*\*\* ./) { # context diff + $file = undef; while (<>) { print unless $opt_n; if ($file && /^--- (\d+)(?:,(\d+))? ----$/) { |