-
Notifications
You must be signed in to change notification settings - Fork 126
Fix list_has_remote() #302
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
Conversation
alerque
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This implementation surprised me a little, but I can't come up with anything better and I can't find a reason this won't work so...
|
I couldn't find anything else that doesn't require you to know the name of the remote and/or branch beforehand... I agree that it smells weird, but it should be pretty robust. I will add a comment before merging. |
|
The Either way both these solutions only tell us if the repo has a remote, not if the branch we are on has a remote tracking branch. |
|
Heh, yes. https://stackoverflow.com/a/9753364 lead me to |
|
I like the looks of that last one much more, and it confirms not just that we have a remote but that the current branch has a tracking branch setup on the remote. I think that's the info we really wanted to confirm in the first place. |
|
Thanks for the challenge on Generally speaking, I vastly prefer to go through commands, not files, at least if they are reasonably old. That way, we benefit from future cleanups, protections, etc in upstream Git. Unfortunately, 'empty' does still output return code |
12f7f65 to
c9287f5
Compare
Fixes #305 $VCSH_BRANCH was not set in list_has_remote() but required. This broke both `vcsh push` and `vcsh pull`. Signed-off-by: Richard Hartmann <[email protected]>
c9287f5 to
b4281d0
Compare
|
@alerque I created #305 just to have something to actually fix and point to. As cbfd1ff is not in any tags, we don't need to add anything to the changelog but it still felt cleaner. Once this PR is merged, we should cut an RC. Not because we would release this precise version, but to trigger users into testing. |
Closes #305