Scripts/git-pre-commit-hook : Handle file renames.

This commit is contained in:
Erik de Castro Lopo 2012-06-19 20:03:47 +10:00
parent 19f326f022
commit 89d310433a

View File

@ -8,7 +8,7 @@ else
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
files=`git diff-index --name-only --cached $against`
files=$(git diff-index --name-status --cached HEAD | grep -v ^D | sed -r "s/^[A-Z]+[A-Z0-9]*[ \t]+/ /")
# Redirect output to stderr.
exec 1>&2