summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBen Shelton <ben.shelton@ni.com>2014-08-04 13:55:49 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-16 15:08:43 +0100
commit7ee64ea60ede5477b2f9a355d93bdc556e6b7895 (patch)
tree3a9f0125ea82caf314c4d2ce37c0d7345a9efe2d /scripts
parent1bf295c85d72b7f6ac394e2c27e66ff507689314 (diff)
downloadopenembedded-core-7ee64ea60ede5477b2f9a355d93bdc556e6b7895.tar.gz
openembedded-core-7ee64ea60ede5477b2f9a355d93bdc556e6b7895.tar.bz2
openembedded-core-7ee64ea60ede5477b2f9a355d93bdc556e6b7895.zip
create-pull-request: Fix error on 2.0 versions of git
On 2.0 versions of git, the create-pull-request script exits with the warning "No match for commit... Are you sure you pushed 'HEAD' there?". This is due to a change in behavior where git used to guess the branch you meant, but no longer does. See the thread at http://www.spinics.net/lists/git/msg233050.html for more information. To accommodate the new behavior, if the COMMIT_ID is set to the default of "HEAD", make it point explicitly to $BRANCH instead. Signed-off-by: Ben Shelton <ben.shelton@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/create-pull-request4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/create-pull-request b/scripts/create-pull-request
index 97ed874e7f..bc897468ef 100755
--- a/scripts/create-pull-request
+++ b/scripts/create-pull-request
@@ -125,6 +125,10 @@ if [ -z "$BRANCH" ]; then
echo "NOTE: Assuming remote branch '$BRANCH', use -b to override."
fi
+if [ "$COMMIT_ID" == "HEAD" ]; then
+ COMMIT_ID="$BRANCH"
+fi
+
if [ -z "$REMOTE_URL" ]; then
echo "ERROR: Missing parameter -u, no git remote!"
usage