Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

git log command fails when branch is local only #61

Closed
cbenz opened this issue Feb 23, 2017 · 3 comments
Closed

git log command fails when branch is local only #61

cbenz opened this issue Feb 23, 2017 · 3 comments
Labels

Comments

@cbenz
Copy link

cbenz commented Feb 23, 2017

When creating a pull request with the "Create pull request in the current branch in current repository (quick)" command, or with the "Create pull request" command, I get this error:

Command failed: git log --reverse --right-only --format=%h origin/master..origin/rename-functions

The operation is aborted. No error message in the developer tools of vscode.

Note: I have set my token properly and the "Browse open pull requests" command works fine.

@cbenz cbenz changed the title git log command failed when creating a pull request git log command fails when creating a pull request Feb 23, 2017
@cbenz cbenz changed the title git log command fails when creating a pull request git log command fails when branch is local only Feb 23, 2017
@cbenz
Copy link
Author

cbenz commented Feb 23, 2017

From the command line this error is displayed:

git log --reverse --right-only --format=%h origin/master..origin/rename-functions
fatal: ambiguous argument 'origin/master..origin/rename-functions': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

I understand that my rename-functions branch is local only and has never been pushed.

The error message should be clearer, or the extension could ask if I'd like to push first.

@KnisterPeter
Copy link
Owner

Thank for the report. I think there should be a notification to push the branch first.

@guillaumemolter
Copy link

guillaumemolter commented Mar 19, 2017

There is a similar behavior if you try to open a PR on an unpublished branch. I will open a separate issue next time I encounter the use case (so I can properly document with snippets and screenshots). Read this issue too fast :-(. Sorry for the duplicate see my remarks in #78.

KnisterPeter added a commit that referenced this issue Mar 29, 2017
Notify user to push branch before creating pull request

Closes #61
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants