mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
1195b41ff4
commit
6e8313de40
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user