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

Call fetch() before determining sync status with Git remote in release() #1205

Merged
merged 12 commits into from Aug 26, 2016

Conversation

Projects
None yet
2 participants
@krlmlr
Member

krlmlr commented Jun 3, 2016

With new git_checks() which uses the same pattern as release_checks(). Failing to fetch, or trying to release a tag, doesn't abort the process, just shows an error:

> git_checks()
Running Git checks for devtools
Checking uncommitted files... OK
Checking if synched with remote branch...
ERROR: Error in 'git2r_remote_fetch': Failed to resolve address for github.com: Temporary failure in name resolution

Fixes #1128.

@hadley

This comment has been minimized.

Member

hadley commented Jun 9, 2016

LGTM

return(invisible())
}
git_checks(pkg)
if (yesno("Were Git checks successful?"))

This comment has been minimized.

@krlmlr

krlmlr Jun 9, 2016

Member

At some point we may want to avoid this question when we "know" that all checks succeeded.

This comment has been minimized.

@hadley

hadley Aug 24, 2016

Member

It's currently so you can ignore if needed — i.e. I don't always actually care that there are uncommitted files but I want to know about it.

Also, I don't actually care if there are local changes that haven't been pushed to the remote; but I do care if there are remote changes I don't have locally. How hard would it be to make that work?

This comment has been minimized.

@krlmlr

krlmlr Aug 24, 2016

Member

Not hard at all, a simple tweak to git_sync_status(). Will change this.

@krlmlr

This comment has been minimized.

Member

krlmlr commented Aug 26, 2016

Tested cases: ahead, behind, and offline. Works for me, ready to merge.

(Tests fail because there's no test coverage for the patch.)

@hadley hadley merged commit 26c507b into r-lib:master Aug 26, 2016

2 of 4 checks passed

codecov/patch 0.00% of diff hit (target 49.15%)
Details
codecov/project 49.13% (-0.03%) compared to 36abd6e
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@krlmlr krlmlr deleted the krlmlr:feature/1128-git-checks branch Aug 26, 2016

@krlmlr krlmlr referenced this pull request Sep 9, 2016

Closed

git_checks() fixes #1337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment