aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2015-02-03 09:08:29 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-07 13:30:57 +0000
commit5ffa98a95317e6bea436e4372b9202f4da0ce2ae (patch)
treee88c27cfb41d03cb3d55825b673f1d370c1a70bf
parent33222af134c465791ed84eccd61bbc2b69ad81f1 (diff)
downloadopenembedded-core-contrib-5ffa98a95317e6bea436e4372b9202f4da0ce2ae.tar.gz
create-pull-request: Fix git request-pull
Signed-off-by: Saul Wold <sgw@linux.intel.com>
-rwxr-xr-xscripts/create-pull-request8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/create-pull-request b/scripts/create-pull-request
index 503248bbf07..d83362f7f48 100755
--- a/scripts/create-pull-request
+++ b/scripts/create-pull-request
@@ -178,7 +178,13 @@ git format-patch -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --
# Customize the cover letter
CL="$ODIR/0000-cover-letter.patch"
PM="$ODIR/pull-msg"
-git request-pull $RELATIVE_TO $REMOTE_URL $COMMIT_ID >> "$PM"
+GIT_VERSION=$(`git --version` | tr -d '[:alpha:][:space:].')
+NEWER_GIT_VERSION=210
+if [ $GIT_VERSION -lt $NEWER_GIT_VERSION ]; then
+ git request-pull $RELATIVE_TO $REMOTE_URL $COMMIT_ID >> "$PM"
+else
+ git request-pull $RELATIVE_TO $REMOTE_URL :$BRANCH >> "$PM"
+fi
if [ $? -ne 0 ]; then
echo "ERROR: git request-pull reported an error"
exit 1