From patchwork Wed Dec 5 23:47:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v2,1/1] create-pull-request: detect trailing white space Date: Wed, 05 Dec 2012 23:47:14 -0000 From: Nitin A Kamble X-Patchwork-Id: 40537 Message-Id: <5dd4b0df68ba17cf9cc6892040f8ab90b66dd911.1354751008.git.nitin.a.kamble@intel.com> To: Openembedded-core@lists.openembedded.org, yocto@yoctoproject.org From: Nitin A Kamble Add logic in the create-pull-request to detect the trailing white space inserted by patches. Signed-off-by: Nitin A Kamble --- 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..58e7df1 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 + +