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

Suppress error output when used outside of git repo #153

Merged
merged 4 commits into from Oct 1, 2020

Conversation

cmccandless
Copy link
Contributor

Resolves #152

@cmccandless cmccandless changed the title aSuppress stderr for git ls-remote --get-url Suppress stderr for git ls-remote --get-url Oct 1, 2020
@smarr
Copy link
Owner

smarr commented Oct 1, 2020

@cmccandless thanks a lot for the PR! :)

However, I think this is likely going to be a little more effort.
I suspect the other git calls will also need to be handled.

And, we need to find a way to make this robust enough for Python 2.7 and Python 3, where tests are currently failing.

@cmccandless
Copy link
Contributor Author

Build failed because it couldn't push to Coveralls. The tests passed.

Let’s be slightly more conservative. This avoids shelling out to git when we know it’s not a repo.

Avoids too much dependency on git behavior that may change between versions.

Signed-off-by: Stefan Marr <git@stefan-marr.de>
@smarr
Copy link
Owner

smarr commented Oct 1, 2020

I pushed one more commit to handle the case outside of a repo more explicit.

@cmccandless thanks for the PR!
@cajomferro thanks for the report!

@smarr smarr merged commit 07fbdf5 into smarr:master Oct 1, 2020
@smarr smarr changed the title Suppress stderr for git ls-remote --get-url Suppress error output when used outside of git repo Oct 1, 2020
@cmccandless cmccandless deleted the fix-152 branch October 14, 2020 17:53
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.

Need for git?
2 participants