mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
create-pull-request: support format-patch options
Added possibility to specify extra format-patch options in the create-pull-request command line: create-pull-request -u contrib -r master -- -v3 (From OE-Core rev: 19e51f05011e827a34890e0c098f3bfa66559e1a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
7e23b174e5
commit
f7c2ec9f87
|
@ -34,7 +34,7 @@ RFC=0
|
||||||
usage() {
|
usage() {
|
||||||
CMD=$(basename $0)
|
CMD=$(basename $0)
|
||||||
cat <<EOM
|
cat <<EOM
|
||||||
Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] [-d relative_dir] -u remote [-b branch]
|
Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] [-d relative_dir] -u remote [-b branch] [-- <format-patch options>]
|
||||||
-b branch Branch name in the specified remote (default: current branch)
|
-b branch Branch name in the specified remote (default: current branch)
|
||||||
-l local branch Local branch name (default: HEAD)
|
-l local branch Local branch name (default: HEAD)
|
||||||
-c Create an RFC (Request for Comment) patch series
|
-c Create an RFC (Request for Comment) patch series
|
||||||
|
@ -57,6 +57,7 @@ Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to
|
||||||
$CMD -u contrib -r master -i misc -b nitin/misc -o pull-misc
|
$CMD -u contrib -r master -i misc -b nitin/misc -o pull-misc
|
||||||
$CMD -u contrib -p "RFC PATCH" -b nitin/experimental
|
$CMD -u contrib -p "RFC PATCH" -b nitin/experimental
|
||||||
$CMD -u contrib -i misc -b nitin/misc -d ./bitbake
|
$CMD -u contrib -i misc -b nitin/misc -d ./bitbake
|
||||||
|
$CMD -u contrib -r origin/master -o /tmp/out.v3 -- -v3 --in-reply-to=20170511120134.XX7799@site.com
|
||||||
EOM
|
EOM
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,9 +109,16 @@ while getopts "b:acd:hi:m:o:p:r:s:u:l:" OPT; do
|
||||||
a)
|
a)
|
||||||
CPR_CONTRIB_AUTO_PUSH="1"
|
CPR_CONTRIB_AUTO_PUSH="1"
|
||||||
;;
|
;;
|
||||||
|
--)
|
||||||
|
shift
|
||||||
|
break
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
shift "$((OPTIND - 1))"
|
||||||
|
extraopts="$@"
|
||||||
|
|
||||||
if [ -z "$REMOTE" ]; then
|
if [ -z "$REMOTE" ]; then
|
||||||
echo "ERROR: Missing parameter -u or CPR_CONTRIB_REMOTE in env, no git remote!"
|
echo "ERROR: Missing parameter -u or CPR_CONTRIB_REMOTE in env, no git remote!"
|
||||||
usage
|
usage
|
||||||
|
@ -201,7 +209,7 @@ if [ -n "$RELDIR" ]; then
|
||||||
ODIR=$(realpath $ODIR)
|
ODIR=$(realpath $ODIR)
|
||||||
pdir=$(pwd)
|
pdir=$(pwd)
|
||||||
cd $RELDIR
|
cd $RELDIR
|
||||||
extraopts="--relative"
|
extraopts="$extraopts --relative"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate the patches and cover letter
|
# Generate the patches and cover letter
|
||||||
|
@ -218,7 +226,7 @@ fi
|
||||||
[ -n "$RELDIR" ] && cd $pdir
|
[ -n "$RELDIR" ] && cd $pdir
|
||||||
|
|
||||||
# Customize the cover letter
|
# Customize the cover letter
|
||||||
CL="$ODIR/0000-cover-letter.patch"
|
CL="$(echo $ODIR/*0000-cover-letter.patch)"
|
||||||
PM="$ODIR/pull-msg"
|
PM="$ODIR/pull-msg"
|
||||||
GIT_VERSION=$(`git --version` | tr -d '[:alpha:][:space:].' | sed 's/\(...\).*/\1/')
|
GIT_VERSION=$(`git --version` | tr -d '[:alpha:][:space:].' | sed 's/\(...\).*/\1/')
|
||||||
NEWER_GIT_VERSION=210
|
NEWER_GIT_VERSION=210
|
||||||
|
|
Loading…
Reference in New Issue
Block a user