[OE-core] [PATCH 1/1] create-pull-request: fix failure with git version 1.8.1.4
nitin.a.kamble at intel.com
nitin.a.kamble at intel.com
Tue Feb 24 19:19:32 UTC 2015
From: Nitin A Kamble <nitin.a.kamble at intel.com>
As seen below, this script fails with git versions having more than 3 digit.
$> ../poky.git/scripts/create-pull-request -b nitin/misc -u contrib -r master.origin
fatal: No such ref: :nitin/misc
fatal: Needed a single revision
ERROR: git request-pull reported an error
Fix it by considering only the top 3 digits of the git version.
Signed-off-by: Nitin A Kamble <nitin.a.kamble 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..a85c83f 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"
--
1.8.1.4
More information about the Openembedded-core
mailing list