Ben Shelton <[email protected]> writes:

> 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 <[email protected]>

I still need to apply this patch in order to use create-pull-request.
Bump?

> ---
>  scripts/create-pull-request | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/scripts/create-pull-request b/scripts/create-pull-request
> index 503248b..2bf5eb5 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
> -- 
> 2.0.4
>
> -- 
> _______________________________________________
> Openembedded-core mailing list
> [email protected]
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to