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

Why is the option allow_empty_commits default to be true? #41

Closed
w568w opened this issue Aug 21, 2024 · 4 comments
Closed

Why is the option allow_empty_commits default to be true? #41

w568w opened this issue Aug 21, 2024 · 4 comments

Comments

@w568w
Copy link

w568w commented Aug 21, 2024

There is an option named allow_empty_commits that controls whether an empty commit is allowed. However, it is true by default, and:

  1. caused a lot of confusion. This package commits every hour and the developer doesn't know how to stop it;
  2. did not make sense. There is no effect to push an empty commit to AUR, which only contains files for building and packaging.

--allow-empty has been added since the initial commit with no reason. So I assume that it is kept true for backward compatibility.

I suggest making it false by default.


Q: But it is a break change...!

I don't think the change will really "break" anyone's workflow. After all, you can publish a new major version for it.

@KSXGitHub
Copy link
Owner

  1. caused a lot of confusion. This package commits every hour and the developer doesn't know how to stop it;

Tell the developers to read the documentation. There's no fixing skill issues.

2. did not make sense. There is no effect to push an empty commit to AUR, which only contains files for building and packaging.

It makes sense for many of my use cases, where CI can sometimes make no change. And I don't want the CI to just fail.

@w568w
Copy link
Author

w568w commented Aug 21, 2024

Tell the developers to read the documentation. There's no fixing skill issues.

I am not defending the developer; it is indeed his fault for not reading the documentation at all. However, isn't it necessary to emphasize this rather unusual default value in the documentation? I think this has confused more people than just him.

I don't want the CI to just fail.

This is actually nothing to do with the default setting.

I suppose your goal is to prevent the CI from failure, and there are many ways to achieve that. I believe that using --allow-empty blindly is one of the worst options. Maybe silently fail and print a warning message in that case?

@KSXGitHub
Copy link
Owner

I actually checked build.sh and saw that allow_empty_commits=false doesn't fail.

@w568w
Copy link
Author

w568w commented Aug 21, 2024

Thanks for your quick fix. 🚀

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

No branches or pull requests

2 participants