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

chore: show extra warning for git scm #2025

Merged
merged 2 commits into from
Apr 4, 2024
Merged

Conversation

olblak
Copy link
Member

@olblak olblak commented Apr 4, 2024

This pullrequest introduces an error message if an Updatecli manifest using the git scm provider relies on force set to true and the default behavior for the workingBranch which is set to false.

As explained in the error message, it can lead to unexpected behavior

Better safe than sorry.

The scm force option set to true means that Updatecli is going to run "git push --force"
Some target plugin, like the shell one, run "git commit -A" to catch all changes done by that target.
Because the Git scm plugin has by default the workingBranch option set to false,
Updatecli may be pushing unwanted changes to the branch %q.
If you know what you are doing, please set the workingBranch option to false in your configuration file to ignore this error message

I am not adding this message to the other provider as the default workingBranch is set to true by default

Test

To test this pull request, you can run the following commands:

cd <to_package_directory>
go test

Additional Information

Tradeoff

Potential improvement

Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
@olblak olblak added this to the 0.75.0 milestone Apr 4, 2024
@olblak olblak merged commit d6cb7a5 into updatecli:main Apr 4, 2024
6 checks passed
@olblak olblak added the enhancement New feature or request label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant