diff --git a/scripts/create-pull-request b/scripts/create-pull-request index e82858bc98..46d65386a3 100755 --- a/scripts/create-pull-request +++ b/scripts/create-pull-request @@ -34,7 +34,7 @@ RFC=0 usage() { CMD=$(basename $0) cat <" EOM } REMOTE="$CPR_CONTRIB_REMOTE" # Parse and validate arguments -while getopts "b:acd:hi:m:o:p:r:s:u:l:" OPT; do +while getopts "b:acd:hi:m:o:p:r:s:u:l:t:" OPT; do case $OPT in b) BRANCH="$OPTARG" @@ -108,6 +110,8 @@ while getopts "b:acd:hi:m:o:p:r:s:u:l:" OPT; do a) CPR_CONTRIB_AUTO_PUSH="1" ;; + t) + IN_REPLY_TO="$OPTARG" esac done @@ -205,7 +209,11 @@ if [ -n "$RELDIR" ]; then 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 "$IN_REPLY_TO" ]; then + git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --in-reply-to="$IN_REPLY_TO" --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null +else + git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null +fi if [ -z "$(ls -A $ODIR 2> /dev/null)" ]; then echo "ERROR: $ODIR is empty, no cover letter and patches was generated!"