I think it would be good if quilt were to warn users when their patches add
trailing whitespace.  It's a silly thing to do.

In patch-scripts I run this during `refpatch'

check_patch()
{
        if grep "^+.*[  ]$" $P/patches/$(stripit $1).patch
        then
                echo warning: $1 adds trailing whitespace
        fi
}

and I have a separate command, strip-trailing-whitespace.sh which is

#!/bin/sh
#
# Strip any trailing whitespace which a unified diff adds.
#

strip1()
{
        TMP=$(mktemp /tmp/XXXXXX)
        cp $1 $TMP
        sed -e '/^+/s/[         ]*$//' < $TMP > $1
        rm $TMP
}

for i in $*
do
        strip1 $i
done



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

Reply via email to