Explorar o código

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.

(From OE-Core rev: d23a1d7df849a2a7d338b2805bba7694717cbe65)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Robert Yang %!s(int64=10) %!d(string=hai) anos
pai
achega
370e730216
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      scripts/create-pull-request

+ 1 - 1
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"