github-gem icon indicating copy to clipboard operation
github-gem copied to clipboard

pull-request is broken: fatal: Needed a single revision

Open rit opened this issue 14 years ago • 21 comments

gh pull-request username fatal: Needed a single revision

rit avatar Apr 23 '10 17:04 rit

Seems like this might be related to private repos.

tysonmote avatar Jan 24 '11 05:01 tysonmote

Still broken? Does "gh pull-request" work at all with the new Pull Requests v2 mechanism?

drnic avatar Jan 31 '11 00:01 drnic

gh -h gives:

  pull-request      => Generate the text for a pull request.
                       % github pull-request [user] [branch]

I assume it is supposed to not only generate text but also perform the pull request? Also, it would be nice if it by default associates the request with the user from whom I forked it and uses whatever the working branch is. When I enter:

$ github pull-request [user] master

I get:

fatal: Needed a single revision

lorensr avatar Apr 17 '11 22:04 lorensr

+1

glennr avatar Sep 08 '11 21:09 glennr

+1

bmatheny avatar Sep 16 '11 18:09 bmatheny

So, pull-request is just broken?

tjacobs avatar Sep 29 '11 13:09 tjacobs

+1

manuelbernhardt avatar Nov 21 '11 17:11 manuelbernhardt

+1

jayniz avatar Dec 05 '11 10:12 jayniz

Anyone want to fix this?

drnic avatar Dec 06 '11 03:12 drnic

gh pull-request lorensr master causes the github gem to execute git request-pull lorensr/master origin, which is what gives the output fatal: Needed a single revision. Taking out the lorensr/ prevents the fatal error: https://gist.github.com/1436737. I can't find anything in the code that communicates with Github - it only execs the above command. man git-request-pull gives "Summarizes the changes between two commits to the standard output, and includes the given URL in the generated summary." I take it that there is no native git concept of a pull request, and that both git request-pull and gh pull-request are just meant to generate suitable text to be emailed to the owner of the remote repo. It would be more useful for gh pull-request to actually perform a github.com pull request (and this is probably what most people expect it to do). This can be done with an HTTP post via the API (http://developer.github.com/v3/pulls/), but that requires authentication. Would it be fine to have gh pull-request prompt for the user's github password (and add a -p password option)?

lorensr avatar Dec 06 '11 04:12 lorensr

I think prompting for the password is fine

manuelbernhardt avatar Dec 06 '11 07:12 manuelbernhardt

Is there any news on this? Is it possible to do a pull request from the command line? I'm using the newest github gem, and I'm still getting this error.

jmuheim avatar Nov 12 '12 15:11 jmuheim

Still getting errors like that. Any suggestions how to do a pull request from command line?

murnieza avatar Feb 05 '13 08:02 murnieza

any updates on this?

lastravex avatar Dec 13 '13 01:12 lastravex

bump

davidtian02 avatar Mar 10 '15 04:03 davidtian02

bump. I still can't do a pull-request from command line.

phspagiari avatar Sep 06 '16 20:09 phspagiari

Don't be so impatient everybody. It's only been 6 years.

jonathancross avatar Oct 13 '16 12:10 jonathancross

+1

castillo-n avatar Sep 26 '17 15:09 castillo-n

+1

jum-s avatar Oct 27 '17 11:10 jum-s

Does anyone have an active fork?

wwalker avatar Oct 11 '19 20:10 wwalker

+1

semmet95 avatar Jun 06 '22 06:06 semmet95