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
merged 3 commits into from
Apr 6, 2018

Conversation

terminalmage
Copy link
Contributor

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.

This allows for local changes to be discarded only when the repo is not
already up-to-date.
Copy link
Contributor

@rallytime rallytime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@terminalmage
Copy link
Contributor Author

@rallytime good catch, updated. Thanks!

@rallytime rallytime merged commit ed8e94a into saltstack:develop Apr 6, 2018
@terminalmage terminalmage deleted the issue35888 branch April 11, 2018 07:30
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.

None yet

2 participants