git.latest: add option to hard-reset only when there are remote changes#46854
Merged
rallytime merged 3 commits intosaltstack:developfrom Apr 6, 2018
Merged
git.latest: add option to hard-reset only when there are remote changes#46854rallytime merged 3 commits intosaltstack:developfrom
rallytime merged 3 commits intosaltstack:developfrom
Conversation
This allows for local changes to be discarded only when the repo is not already up-to-date.
rallytime
reviewed
Apr 4, 2018
Contributor
rallytime
left a comment
There was a problem hiding this comment.
I just have a couple of really picky comments, otherwise this looks really nice and ++ for tests. :)
salt/modules/git.py
Outdated
| Windows only. Required when specifying ``user``. This parameter will be | ||
| ignored on non-Windows platforms. | ||
|
|
||
| .. versionadded:: 2016.3.4 |
Contributor
There was a problem hiding this comment.
If this whole function is new, then I don't think this versionadded here is correct.
salt/modules/git.py
Outdated
| If ``True``, do not log an error to the minion log if the git command | ||
| returns a nonzero exit status. | ||
|
|
||
| .. versionadded:: 2015.8.0 |
Contributor
There was a problem hiding this comment.
Same comment here as above.
salt/modules/git.py
Outdated
| be observed (i.e. the encoding specified by the locale will be | ||
| tried first, and if that fails, UTF-8 will be used as a fallback). | ||
|
|
||
| .. versionadded:: 2018.3.1 |
Contributor
There was a problem hiding this comment.
Also probably not needed, I think. :)
This removes some versionadded/versionchanged lines that were unnecessary in a brand new function, but ended up there because of copypasta. It also updates the output_encoding documentation to match the updated docs from a recent PR that hasn't yet been merged from 2018.3 to develop.
Contributor
Author
|
@rallytime good catch, updated. Thanks! |
rallytime
approved these changes
Apr 5, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a third potential value for the
force_resetargument,'remote-changes'which if used will not discard uncommitted changes unless the local clone is not up-to-date with the remote repository.Resolves #35888.