title: Nothing happens on git pull hook (post-update)
body: <p>when I do a <code>git pull</code> on live server I'm logged in as root and so all modified or new files user and group are set to <code>root:root</code>.</p>
  
  <p>I've tried this set up in my <code>post-update</code> hook file:</p>
  
  <pre><code>OWNER="example:example"
  REPO_PATH="/home/example/public_html"
  
  cd $REPO_PATH || exit
  unset GIT_DIR
  FILES="$(git diff-tree -r --name-only --no-commit-id)"
  git merge FETCH_HEAD
  
  for file in $FILES
      do 
      chown $OWNER $file
  done
  
  exec git update-server-info
  </code></pre>
  
  <p>When I run a <code>git pull</code> it just doesn't do anything.</p>