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

Projects
None yet
2 participants
@terminalmage
Copy link
Contributor

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 some commits Mar 30, 2018

Add `remote-changes` value for git.latest state
This allows for local changes to be discarded only when the repo is not
already up-to-date.
@rallytime
Copy link
Contributor

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

This comment has been minimized.

Copy link
@rallytime

rallytime Apr 4, 2018

Contributor

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

This comment has been minimized.

Copy link
@rallytime

rallytime Apr 4, 2018

Contributor

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

This comment has been minimized.

Copy link
@rallytime

rallytime Apr 4, 2018

Contributor

Also probably not needed, I think. :)

Minor docstring fixes
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

This comment has been minimized.

Copy link
Contributor Author

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

jenkins/PR/salt-pr-linode-cent7-py3 Pull Requests » Salt PR - Linode CentOS 7 - PY3 #3827 — ABORTED
Details
jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #17873 — ABORTED
Details
codeclimate 2 issues to fix
Details
default Build finished.
Details
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt PR - Linode Ubuntu14.04 #21590 — FAILURE
Details
WIP ready for review
Details
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #23990 — SUCCESS
Details
jenkins/PR/salt-pr-docs-n Pull Requests » Salt PR - Docs #16148 — SUCCESS
Details
jenkins/PR/salt-pr-linode-ubuntu16-py3 Pull Requests » Salt PR - Linode Ubuntu16.04 - PY3 #8654 — SUCCESS
Details
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #20767 — SUCCESS
Details

@terminalmage terminalmage deleted the terminalmage:issue35888 branch Apr 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.