summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-03-04 01:29:53 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-09 16:00:21 +0000
commitd23a1d7df849a2a7d338b2805bba7694717cbe65 (patch)
tree37300470a7b4f2c0e550337246f42c108681fb67 /scripts
parentdf3ecaf86360a9c109b1b19bfa8a52890315bbdc (diff)
downloadopenembedded-core-d23a1d7df849a2a7d338b2805bba7694717cbe65.tar.gz
openembedded-core-d23a1d7df849a2a7d338b2805bba7694717cbe65.tar.bz2
openembedded-core-d23a1d7df849a2a7d338b2805bba7694717cbe65.zip
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@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/create-pull-request2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/create-pull-request b/scripts/create-pull-request
index d83362f7f4..97ed874e7f 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"