Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read current remote name (defaulting to origin) #318

Merged
merged 1 commit into from
Sep 14, 2018

Conversation

mcdado
Copy link
Contributor

@mcdado mcdado commented Sep 14, 2018

Hey, since i'm seeing the following dreaded error message in the Output panel

[...]
git remote get-url origin  (completed in 0.011s)
fatal: No such remote 'origin'

This happens when there are no remotes called origin (am I the only way that gives descriptive names to remotes?). I tried to look into the issue, and came up with this pull request. It is in no way tested, since I don't know how to "compile" an extension for testing. So take it as it is and fix it in case, or tell me what I need to change.

@mcdado
Copy link
Contributor Author

mcdado commented Sep 14, 2018

Fixes #281

@DonJayamanne DonJayamanne merged commit 1ae3e26 into DonJayamanne:master Sep 14, 2018
@mcdado mcdado deleted the issue281 branch September 14, 2018 22:02
@bhack
Copy link

bhack commented Nov 14, 2018

Still a problem here. In my case it needs to execute git remote get-url origin instead it is executing git remote get-url remotes/origin

@mcdado
Copy link
Contributor Author

mcdado commented Nov 14, 2018

I just checked, and as I mentioned in the comment of this PR, my change was totally untested 😅

#330 should fix it though…

@bhack
Copy link

bhack commented Nov 14, 2018

I think that #330 it is already in a release. Right? So it is not fixed cause I've an updated version of the plugin.

@mcdado
Copy link
Contributor Author

mcdado commented Nov 14, 2018

It's released to the releases page but it's not released to the extension marketplace from what I can see… I also checked for updates in VS Code and I'm still on 0.4.3

@bhack
Copy link

bhack commented Nov 14, 2018

Ok thanks so we need to wait for the Marketplace push.

@ludaavics
Copy link

For what it's worth, I am on 0.4.4 and still have his error.

@ole1986
Copy link
Contributor

ole1986 commented Nov 30, 2018

@ludaavics what output do you get when entering the below command?

git status --porcelain=v1 -b --untracked-files=no

@ludaavics
Copy link

ludaavics commented Nov 30, 2018

OK after some playing around, here is how to replicate:

# on dev branch -- no error
$ git status --porcelain=v1 -b --untracked-files=no
## dev...github/dev

# create a new branch -- errors out
$ git checkout -b foo
$ git status --porcelain=v1 -b --untracked-files=no
## foo

# push new branch -- still errors out
$ git push github foo
$ git status --porcelain=v1 -b --untracked-files=no
## foo

# set upstream -- back to no error
$ git push --set-upstream github foo
$ git status --porcelain=v1 -b --untracked-files=no
## foo...github/foo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants