diff options
author | Ben Shelton <ben.shelton@ni.com> | 2014-08-04 13:55:49 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-16 15:09:21 +0100 |
commit | 6e8313de403538157f086dfbf589896035e7126f (patch) | |
tree | a19b4d2c557987804617967e122a429a42336a9c | |
parent | 1195b41ff4a77fc922ec4ca55ed1acae91a856a4 (diff) | |
download | poky-6e8313de403538157f086dfbf589896035e7126f.tar.gz |
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.
(From OE-Core rev: 7ee64ea60ede5477b2f9a355d93bdc556e6b7895)
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/create-pull-request | 4 |
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 | |||
125 | echo "NOTE: Assuming remote branch '$BRANCH', use -b to override." | 125 | echo "NOTE: Assuming remote branch '$BRANCH', use -b to override." |
126 | fi | 126 | fi |
127 | 127 | ||
128 | if [ "$COMMIT_ID" == "HEAD" ]; then | ||
129 | COMMIT_ID="$BRANCH" | ||
130 | fi | ||
131 | |||
128 | if [ -z "$REMOTE_URL" ]; then | 132 | if [ -z "$REMOTE_URL" ]; then |
129 | echo "ERROR: Missing parameter -u, no git remote!" | 133 | echo "ERROR: Missing parameter -u, no git remote!" |
130 | usage | 134 | usage |