Misc: check trailing white space in the patches
v2 cover Misc: check trailing white space in the patches
From: Nitin A Kamble <[email protected]>
The earlier (v1) patch was checking trailing white space only for added empty lines. This v2 patch checks for all the lines added by patches.
Thanks,
Nitin
The following changes since commit 381c4b69c7e8b452f4d3de2f8214e6e5f6a9abe7:
sstate.bbclass: fix detection of owners matching sstate files (2012-12-05 15:34:07 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib nitin/misc
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/misc
Nitin A Kamble (1):
create-pull-request: detect trailing white space
scripts/create-pull-request | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-)
Signature · 1 line
1.7.3.4
PATCH v2 1/1 create-pull-request: detect trailing white space
From: Nitin A Kamble <[email protected]>
Add logic in the create-pull-request to detect the trailing white space inserted by patches.
--- scripts/create-pull-request | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-)
scripts/create-pull-request +12 -1
@@ -173,7 +173,6 @@ mkdir $ODIR # Generate the patches and cover letter git format-patch -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null - # Customize the cover letter CL="$ODIR/0000-cover-letter.patch" PM="$ODIR/pull-msg"
@@ -229,3 +228,15 @@ Review their content, especially the summary mail: When you are satisfied, you can send them with: send-pull-request -a -p $ODIR EOM + +# Check the patches for trailing white space +echo +egrep -nH -e "^\+.*\s+$" $ODIR/* > /dev/null +if [ $? -ne 1 ]; then + echo "WARNING: Trailing white space detected at these locations" + egrep -nH -e "^\+.*\s+$" $ODIR/* +else + echo "Note: No trailing white space is detected in these patches :)" +fi + +
Signature · 1 line
1.7.3.4