I have a situation wherein my pre-receive hook script needs to allow only those files in commits whose name starts with Tag_
For example, I have a commit which contains 3 files,
Tag_a
Tagb
Tag_c
now my pre-receive script should allow only Tag_a
and Tag_b
but not Tagb
.
I read somewhere on Stack Overflow that if we reject a file and allow the other files to be pushed, then the hash (sha1) value of the commit may change.
So my question is, is there a way to achieve this?