]> code.ossystems Code Review - openembedded-core.git/commitdiff
create-pull-request: Fix git request-pull
authorSaul Wold <sgw@linux.intel.com>
Tue, 3 Feb 2015 17:08:29 +0000 (09:08 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 7 Feb 2015 13:30:57 +0000 (13:30 +0000)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
scripts/create-pull-request

index 503248bbf071751f2c5da01fd40a79f35f039a2e..d83362f7f48a3b4f86b11c2268e41e72889e221e 100755 (executable)
@@ -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