0

I need to get the file names, which are comitted withhin the post-receive hook.

#!/bin/bash

while read oldrev newrev refname
do
   /* If updated-file == "myFile", then do a specific task */
done

How can i get a reference to the changed files?

Emre Öztürk
  • 2,660
  • 4
  • 16
  • 19

1 Answers1

1

I found a simple solution to get the list of changed files.

git diff --name-only $oldrev $newrev
Emre Öztürk
  • 2,660
  • 4
  • 16
  • 19