git-acp-ansible icon indicating copy to clipboard operation
git-acp-ansible copied to clipboard

push_option: not working correctly

Open reneschulzottogroup opened this issue 1 year ago • 3 comments

Hi,

We used git-acp-ansible v1.1.2 from the source pypi.org and created a push with special options:

push_option: --allow-empty --no-verify

After updating to git-acp-ansible v2.1.0 from github.com/lvrfrc87, the --allow-empty option no longer works.

It doesn't work as a single parameter or with the order changed. It will always be ignored.

Best regards, René

reneschulzottogroup avatar Sep 13 '23 08:09 reneschulzottogroup

Hello,

Can you please update to the latest version and let me know? As far as I am aware, it should working fine. Thanks

lvrfrc87 avatar Sep 19 '23 12:09 lvrfrc87

Hi lvrfrc87,

I took a look at the py script. The parameter --allow-empty is a part of the commit operation. The push_option: relates to the git push command push_option=dict(default=None, type="str").

The commit Command have no options.

command = [self.git_path, "commit", "-m", comment] command.insert(3, "--push-option={0} ".format(push_option))

So, the parameter may not work for empty commit messages.

I did not review the old code, but I believe it was a bug rather than a feature to handle empty commit messages using "push_option:". However, it was functioning.

It would be great if you could also implement a commit_option: switch.

Best regards, René

reneschulzottogroup avatar Sep 20 '23 06:09 reneschulzottogroup

@reneschulzottogroup So,if I understand correctly you are asking to support --allow-empty commit. Is that correct?

lvrfrc87 avatar Sep 26 '23 12:09 lvrfrc87

This is fixed in Ver. 2.3.0

lvrfrc87 avatar Jun 04 '24 11:06 lvrfrc87

very nice!

reneschulzottogroup avatar Jun 04 '24 12:06 reneschulzottogroup