summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2015-12-10 14:30:43 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-11 23:26:32 +0000
commitf04fb8806c75fa7eb9d139c4daaae2de6da6e1ea (patch)
tree6369dcd3119ed7d9b332da991671a24a17070443 /scripts
parent928ceb67cfe213b1eed0e392c1a319bcfa3068c7 (diff)
downloadpoky-f04fb8806c75fa7eb9d139c4daaae2de6da6e1ea.tar.gz
scripts/create-pull-request: fix git request-pull syntax
* at least with git 2.6.3 I see git request-pull failing when there is only :{BRANCH} as ending commit * $ git request-pull origin/dizzy git://git.openembedded.org/openembedded-core-contrib jansa/dizzy-backports:jansa/dizzy-backports The following changes since commit 7bb182bdd130266100fc541fd09b82d09c51cd80: build-appliance-image: Update to dizzy head revision (2015-09-29 14:56:04 +0100) ... And finds correct 7 changes there * $ git request-pull origin/dizzy git://git.openembedded.org/openembedded-core-contrib :jansa/dizzy-backports warn: No match for commit 6068d1c90336ddc1fb32856efd1d9ccf07733896 found at git://git.openembedded.org/openembedded-core-contrib warn: Are you sure you pushed 'jansa/dizzy-backports' there? The following changes since commit 97756472d3a69eaca95d105494ffea78c6b077e0: build-appliance-image: Update to dizzy head revision (2014-10-18 16:16:27 +0200) ... and lists all commits in _current_ branch since origin/dizzy, then it refuses to continue, because there are too many changes. * 6068d1c90336ddc1fb32856efd1d9ccf07733896 is this commit in jansa/master-submitted branch so it really shouldn't be included in pull request from jansa/dizzy branch. * git help says: <end> Commit to end at (defaults to HEAD). This names the commit at the tip of the history you are asking to be pulled. When the repository named by <url> has the commit at a tip of a ref that is different from the ref you have locally, you can use the <local>:<remote> syntax, to have its local name, a colon :, and its remote name. * maybe the syntax got changes since git 2.1.0 when Saul added :${BRANCH} * I haven't found how to respect ${COMMIT_ID in the new syntax (From OE-Core rev: 2336d1e5de671f538f0cd493b75d29e1dfdb0caf) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 a3744cceaa..dd66dfe46e 100755
--- a/scripts/create-pull-request
+++ b/scripts/create-pull-request
@@ -203,7 +203,7 @@ NEWER_GIT_VERSION=210
203if [ $GIT_VERSION -lt $NEWER_GIT_VERSION ]; then 203if [ $GIT_VERSION -lt $NEWER_GIT_VERSION ]; then
204 git request-pull $RELATIVE_TO $REMOTE_URL $COMMIT_ID >> "$PM" 204 git request-pull $RELATIVE_TO $REMOTE_URL $COMMIT_ID >> "$PM"
205else 205else
206 git request-pull $RELATIVE_TO $REMOTE_URL :$BRANCH >> "$PM" 206 git request-pull $RELATIVE_TO $REMOTE_URL $BRANCH:$BRANCH >> "$PM"
207fi 207fi
208if [ $? -ne 0 ]; then 208if [ $? -ne 0 ]; then
209 echo "ERROR: git request-pull reported an error" 209 echo "ERROR: git request-pull reported an error"