diff options
Diffstat (limited to 'scripts/create-pull-request')
-rwxr-xr-x | scripts/create-pull-request | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/create-pull-request b/scripts/create-pull-request index 19ba58869f9..a3744cceaa3 100755 --- a/scripts/create-pull-request +++ b/scripts/create-pull-request @@ -185,6 +185,14 @@ fi # Generate the patches and cover letter git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null +if [ -z "$(ls -A $ODIR 2> /dev/null)" ]; then + echo "ERROR: $ODIR is empty, no cover letter and patches was generated!" + echo " This is most likely due to that \$RRELATIVE_TO..\$COMMIT_ID" + echo " ($RELATIVE_TO..$COMMIT_ID) don't contain any differences." + rmdir $ODIR + exit 1 +fi + [ -n "$RELDIR" ] && cd $pdir # Customize the cover letter |