Control Freak plugin offfers to block specific file types to commit. But How to utilize it.
Issue #135
closed
I can see that, there is an option to block specific file types in the configuration of the control freak plugin. but how to utilize it? I tried with different kinds of expressions like ( *.pdf and pdf and .pdf ) ...and nothing worked to block-pushing pdf files to the repository.
Please find the attached screenshot.
My question is, how to block specific files to be pushed to bitbucket central repository.
Thanks Mahesh
Comments (4)
-
repo owner -
repo owner They way you’ve configured things all NEW files than end in *.md should be blocked if they are 77 bytes or larger.
-
repo owner - changed status to resolved
Closing since we cannot replicate this.
Note: starting with Control Freak v2020.11.03 we always allow ALL files through that are between 50 - 300 bytes, since otherwise the Git-LFS pointer files get rejected!
-
repo owner - changed status to closed
- Log in to comment
(copy/pasting my reply on community.atlassian.com):
Are you sure? This is working for me (I'm the primary maintainer of this plugin):
There is one important loophole to know about with this control: any file that already exists in the repo (on any branch or tag, including unreachable tags or branches, and including files deleted many commits ago - they are still present in the repo) cannot be blocked (based on contents, not based on filename). The control only gets triggered during the phase where git-receive is calculating missing files to accept during the push, and since git-receive skips files that already exist on the server, regardless of their name, there is no way to block those.
This means developers can also easily get around the control: "git push random-file.allowed" and then rename to "random-file.pdf" in a later push.
Is there any chance you guys are hitting against this loophole, where byte-for-byte identical files (regardless of name) cannot be blocked if they are already present in bitbucket?
p.s. the control happily accepts all of these: pdf, .pdf, *.pdf
(they all evaluate to the same file type)