Git hooks file name regex error is backward
Zendesk issue: https://gitlab.zendesk.com/agent/tickets/14717
Quote from Zendesk:
I configured the "Prohibited file names" Git Hook with fsck.txt in the field. According to the tool tip this mean "All committed filenames must not match this Ruby regular expression to be pushed."
I then created a file called fsck.txt and tried to push it. The error I got was the reverse:
remote: GitLab: File name "fsck.txt" does not follow the pattern 'fsck.txt'
I mean it did what I expected in that it refused to accept fsck.txt. However it says that fsck.txt does NOT follow the pattern when in fact it does. It doesn't pass the rule, but it does follow the pattern. This error should be revised.
I found that this code is at https://gitlab.com/gitlab-org/gitlab-ee/blob/master/lib/gitlab/git_access.rb#L250
cc/ @brodock Will you take a look, please?