Control Freak: Block Empty Commits doesn't seem to work
Scenario: Default Development Production Release Branches Hotfix Branches (all set to X) An empty commit was nevertheless pushed:
$ git commit -a --allow-empty-message -m "" [master 6f8fdfa] 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 AndNowToSthCompletelyDifferent.txt $ git push Counting objects: 2, done. Delta compression using up to 4 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 232 bytes | 232.00 KiB/s, done. Total 2 (delta 1), reused 0 (delta 0) To ssh://bitbucket.xxxxxx e1d12ba..6f8fdfa master -> master
BB Server v5.14.1 Control Freak Version 2018.09.12
Comments (3)
-
repo owner -
repo owner - changed status to invalid
Thanks for the bug report! Marking as INVALID because the "Block Empty Commits" control is not about commit messages. Please don't hesitate to comment or reopen if you disagree with this assessment.
-
reporter My deepest apologies.... this was a misunderstanding of functionality.
- Log in to comment
"Empty Commits" in this context refers to commits with no changes (e.g., "git commit --allow-empty"). It's not referring to the commit messages. I just checked and the control works correctly:
If you want to block empty commit messages you can use the "Jira Policy" control and set something appropriate inside the "Commit Messages Must - Match regex:" field.
This will work even if you don't use Jira (simply uncheck everything in the "Jira References Must" section).