All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] create-pull-request: Fix error on 2.0 versions of git
@ 2014-08-04 18:55 Ben Shelton
  2015-07-13 18:43 ` Richard Tollerton
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Shelton @ 2014-08-04 18:55 UTC (permalink / raw)
  To: openembedded-core

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>
---
 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



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] create-pull-request: Fix error on 2.0 versions of git
  2014-08-04 18:55 [PATCH] create-pull-request: Fix error on 2.0 versions of git Ben Shelton
@ 2015-07-13 18:43 ` Richard Tollerton
  2015-07-14  9:49   ` Burton, Ross
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Tollerton @ 2015-07-13 18:43 UTC (permalink / raw)
  To: Ben Shelton, openembedded-core

Ben Shelton <ben.shelton@ni.com> 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 <ben.shelton@ni.com>

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
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] create-pull-request: Fix error on 2.0 versions of git
  2015-07-13 18:43 ` Richard Tollerton
@ 2015-07-14  9:49   ` Burton, Ross
  2015-07-17  2:35     ` Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2015-07-14  9:49 UTC (permalink / raw)
  To: Richard Tollerton; +Cc: Ben Shelton, OE-core

[-- Attachment #1: Type: text/plain, Size: 881 bytes --]

On 13 July 2015 at 19:43, Richard Tollerton <rich.tollerton@ni.com> wrote:

> Ben Shelton <ben.shelton@ni.com> 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 <ben.shelton@ni.com>
>
> I still need to apply this patch in order to use create-pull-request.
> Bump?
>

Not sure how this got missed, and I can't even find it in my archives, but
it's queued now.

Ross

[-- Attachment #2: Type: text/html, Size: 1716 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] create-pull-request: Fix error on 2.0 versions of git
  2015-07-14  9:49   ` Burton, Ross
@ 2015-07-17  2:35     ` Robert Yang
  2015-07-17 16:39       ` Richard Tollerton
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2015-07-17  2:35 UTC (permalink / raw)
  To: Burton, Ross, Richard Tollerton; +Cc: Ben Shelton, OE-core



On 07/14/2015 05:49 PM, Burton, Ross wrote:
>
> On 13 July 2015 at 19:43, Richard Tollerton <rich.tollerton@ni.com
> <mailto:rich.tollerton@ni.com>> wrote:
>
>     Ben Shelton <ben.shelton@ni.com <mailto:ben.shelton@ni.com>> 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 <ben.shelton@ni.com <mailto:ben.shelton@ni.com>>
>
>     I still need to apply this patch in order to use create-pull-request.
>     Bump?
>
>
> Not sure how this got missed, and I can't even find it in my archives, but it's
> queued now.

This patch breaks create-pull-request:
$ ./scripts/create-pull-request -u oe-contrib -b rbt/PU -r HEAD~5
fatal: ambiguous argument 'HEAD~5..rbt/PU': unknown revision or path not in the 
working tree.
Use '--' to separate paths from revisions
fatal: Needed a single revision
ERROR: git request-pull reported an error

$ git --version
git version 1.7.9.5


Richard Tollerton, does Saul's fix work for you for git 2.0?

commit 5ffa98a95317e6bea436e4372b9202f4da0ce2ae
Author: Saul Wold <sgw@linux.intel.com>
Date:   Tue Feb 3 09:08:29 2015 -0800

     create-pull-request: Fix git request-pull



// Robert

>
> Ross
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] create-pull-request: Fix error on 2.0 versions of git
  2015-07-17  2:35     ` Robert Yang
@ 2015-07-17 16:39       ` Richard Tollerton
  2015-07-17 16:50         ` Burton, Ross
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Tollerton @ 2015-07-17 16:39 UTC (permalink / raw)
  To: Robert Yang, Burton, Ross; +Cc: OE-core

Robert Yang <liezhi.yang@windriver.com> writes:

> On 07/14/2015 05:49 PM, Burton, Ross wrote:
>>
>> On 13 July 2015 at 19:43, Richard Tollerton <rich.tollerton@ni.com
>> <mailto:rich.tollerton@ni.com>> wrote:
>>
>>     I still need to apply this patch in order to use create-pull-request.
>>     Bump?
>>
>> Not sure how this got missed, and I can't even find it in my archives, but it's
>> queued now.
>
> This patch breaks create-pull-request:
> $ ./scripts/create-pull-request -u oe-contrib -b rbt/PU -r HEAD~5
> fatal: ambiguous argument 'HEAD~5..rbt/PU': unknown revision or path not in the 
> working tree.
> Use '--' to separate paths from revisions
> fatal: Needed a single revision
> ERROR: git request-pull reported an error
>
> $ git --version
> git version 1.7.9.5
>
>
> Richard Tollerton, does Saul's fix work for you for git 2.0?
>
> commit 5ffa98a95317e6bea436e4372b9202f4da0ce2ae
> Author: Saul Wold <sgw@linux.intel.com>
> Date:   Tue Feb 3 09:08:29 2015 -0800
>
>      create-pull-request: Fix git request-pull

Eek! Yes, it seems like it does work. I think I might have
misinterpreted an error in running `create-pull-request`, then changed
the command line enough to (coincidentally) work after I reapplied the
patch.

Ross, please revert commit 7ee64ea60ede5477b2f9a355d93bdc556e6b7895. My
sincere apologies for the inconvenience.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] create-pull-request: Fix error on 2.0 versions of git
  2015-07-17 16:39       ` Richard Tollerton
@ 2015-07-17 16:50         ` Burton, Ross
  0 siblings, 0 replies; 6+ messages in thread
From: Burton, Ross @ 2015-07-17 16:50 UTC (permalink / raw)
  To: Richard Tollerton; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 293 bytes --]

On 17 July 2015 at 17:39, Richard Tollerton <rich.tollerton@ni.com> wrote:

> Ross, please revert commit 7ee64ea60ede5477b2f9a355d93bdc556e6b7895. My
> sincere apologies for the inconvenience.
>

Already done in master-under-test.  Thanks for confirming that it works for
you.

Ross

[-- Attachment #2: Type: text/html, Size: 699 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-17 16:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-04 18:55 [PATCH] create-pull-request: Fix error on 2.0 versions of git Ben Shelton
2015-07-13 18:43 ` Richard Tollerton
2015-07-14  9:49   ` Burton, Ross
2015-07-17  2:35     ` Robert Yang
2015-07-17 16:39       ` Richard Tollerton
2015-07-17 16:50         ` Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.