Skip to contentSkip to conversation

Fix a runtime issue with the create-pull-request script

PATCH New [email protected] 1 participant 2 messages Feb 24, 2015

lore
Share & tools
lore
#0 lore raw

cover Fix a runtime issue with the create-pull-request script

From: Nitin A Kamble <[email protected]>

This commit fixes the create-pull-request script failure with certain versions of the git.

Thanks,
Nitin

The following changes since commit 4d83a90bfb5a41deb81ca8878363a89fccf95d89:

  gst-plugins-package.inc: Avoid dependency on ${PN} from ${PN}-<plugin> (2015-02-24 17:41:44 +0000)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib nitin/misc
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=nitin/misc

Nitin A Kamble (1):
create-pull-request: fix failure with git version 1.8.1.4

 scripts/create-pull-request | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
1.8.1.4
#1 lore raw

PATCH 1/1 create-pull-request: fix failure with git version 1.8.1.4

From: Nitin A Kamble <[email protected]>

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.

---
 scripts/create-pull-request | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/create-pull-request +1 -1
index d83362f..a85c83f 100755
@@ -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"
Signature · 1 line
1.8.1.4