[OE-core] [PATCH 1/1] create-pull-request: detect trailing white space
nitin.a.kamble at intel.com
nitin.a.kamble at intel.com
Wed Dec 5 23:37:42 UTC 2012
From: Nitin A Kamble <nitin.a.kamble at intel.com>
Add logic in the create-pull-request to detect the trailing white space
inserted by patches.
Signed-off-by: Nitin A Kamble <nitin.a.kamble at intel.com>
---
scripts/create-pull-request | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/scripts/create-pull-request b/scripts/create-pull-request
index 9a8913d..c35c427 100755
--- a/scripts/create-pull-request
+++ b/scripts/create-pull-request
@@ -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
+
+
--
1.7.3.4
More information about the Openembedded-core
mailing list