Hi Andreas,

Le vendredi 30 novembre 2012 à 10:18 +0100, Andreas Krebbel a écrit :
> the script for trailing whitespace removal fails for me if a context diff has 
> an "delete-only" chunk
> at the end. The following patch fixes this for me.

This is because apparently chunk halves which contain no changes can be
omitted from context diffs.

Didn't know context diffs were still in use somewhere...

>  quilt/scripts/remove-trailing-ws.in |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> Index: quilt-0.48/quilt/scripts/remove-trailing-ws.in
> ===================================================================
> --- quilt-0.48.orig/quilt/scripts/remove-trailing-ws.in
> +++ quilt-0.48/quilt/scripts/remove-trailing-ws.in
> @@ -88,8 +88,7 @@ while (<>) {
>               my $last_line = defined $2 ? $2 : $1;
>               while ($line_number <= $last_line) {
>                   $_ = <>;
> -                 defined $_
> -                     or die sprintf(_("%s: I'm confused.\n"), $0);
> +                 defined $_ or last;
>                   if (s/(^[+!] .*?)[ \t]+$/$1/) {
>                       push @{$files{$file}}, $line_number;
>                   }
> 

Looks reasonable. Applied, thanks.

-- 
Jean Delvare
Suse L3


_______________________________________________
Quilt-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to