So I want to have a file e.g. "whitelisted-files.txt" which contains the file-names jenkins are allowed to change. I´m trying to create a pre-receive hook that reads the latest version of "whitelisted-files.txt" from the branch that jenkins are pushing to. After reading I will compare the file-names to the files changed in the commit. To be clear, I don´t want to read the files being committed.
Is that possible? I guess there is no file-path where the file lies since it can exist in multiple branches and multiple versions in each branch? All help appreciated 