Post-receive githook for loop

49 views Asked by At

Is there logic that can check if the push included the creation of a new file in the a files directory in git repo?

I am looking to execute a python script only if the push had a new file created in the files directory.

One example uses git diff --name-only --diff-filter=A and grep

Which does look to answer my question, how could I use a for loop to execute the python script x amount of times using each new file set as a parameter?

Eg. 3 new files added to the directory githook to then execute the python script 3 times each time passing the new file as a variable?

0

There are 0 answers