]> code.ossystems Code Review - openembedded-core.git/commitdiff
create-pull-request: fix git GIT_VERSION
authorRobert Yang <liezhi.yang@windriver.com>
Wed, 4 Mar 2015 09:29:53 +0000 (01:29 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 9 Mar 2015 16:00:21 +0000 (16:00 +0000)
If the git version is 1.7.9.5, then 1795 is bigger than 210 which causes
errors like:
fatal: No such ref: :rbt/bash
fatal: Needed a single revision
ERROR: git request-pull reported an error

Use the first 3 numbers to fix the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/create-pull-request

index d83362f7f48a3b4f86b11c2268e41e72889e221e..97ed874e7f9ff7a5bb9fdf6d056db14b373745e9 100755 (executable)
@@ -178,7 +178,7 @@ 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_VERSION=$(`git --version` | tr -d '[:alpha:][:space:].')
+GIT_VERSION=$(`git --version` | tr -d '[:alpha:][:space:].' | sed 's/\(...\).*/\1/')
 NEWER_GIT_VERSION=210
 if [ $GIT_VERSION -lt $NEWER_GIT_VERSION ]; then
        git request-pull $RELATIVE_TO $REMOTE_URL $COMMIT_ID >> "$PM"