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

git.latest: add option to hard-reset only when there are remote changes #46854

merged 3 commits into from Apr 6, 2018


Copy link

@terminalmage terminalmage commented Apr 3, 2018

This adds a third potential value for the force_reset argument, '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.

terminalmage added 2 commits Apr 3, 2018
This allows for local changes to be discarded only when the repo is not
already up-to-date.
Copy link

@rallytime rallytime left a comment

I just have a couple of really picky comments, otherwise this looks really nice and ++ for tests. :)

Windows only. Required when specifying ``user``. This parameter will be
ignored on non-Windows platforms.
.. versionadded:: 2016.3.4
Copy link

@rallytime rallytime Apr 4, 2018

If this whole function is new, then I don't think this versionadded here is correct.

If ``True``, do not log an error to the minion log if the git command
returns a nonzero exit status.
.. versionadded:: 2015.8.0
Copy link

@rallytime rallytime Apr 4, 2018

Same comment here as above.

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
Copy link

@rallytime rallytime Apr 4, 2018

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.
Copy link
Collaborator Author

@terminalmage terminalmage commented Apr 5, 2018

@rallytime good catch, updated. Thanks!

@terminalmage terminalmage requested a review from rallytime Apr 5, 2018
@rallytime rallytime merged commit ed8e94a into saltstack:develop Apr 6, 2018
5 of 10 checks passed
@terminalmage terminalmage deleted the issue35888 branch Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants