[oe-commits] Robert Yang : create-pull-request: fix git GIT_VERSION

git at git.openembedded.org git at git.openembedded.org
Tue Mar 10 10:48:08 UTC 2015


Module: openembedded-core.git
Branch: master
Commit: d23a1d7df849a2a7d338b2805bba7694717cbe65
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=d23a1d7df849a2a7d338b2805bba7694717cbe65

Author: Robert Yang <liezhi.yang at windriver.com>
Date:   Wed Mar  4 01:29:53 2015 -0800

create-pull-request: fix git GIT_VERSION

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 at windriver.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 scripts/create-pull-request | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/create-pull-request b/scripts/create-pull-request
index d83362f..97ed874 100755
--- a/scripts/create-pull-request
+++ b/scripts/create-pull-request
@@ -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"



More information about the Openembedded-commits mailing list