Use 'git checkout HEAD' instead of reset+checkout.

Thanks for the suggestion to Jonathan Callen.
This commit is contained in:
Michał Górny 2010-07-13 18:45:50 +02:00
parent 671838fee9
commit 0dca83a452

View File

@ -174,8 +174,7 @@ check_for_changes() {
# Discard any changes to a particular set of files.
vcs_reset() {
if [ ${SC_VCS%-svn} = git ]; then
req git reset -q HEAD -- "${@}"
git checkout -f -- "${@}" 2>/dev/null || req rm -f -- "${@}"
git checkout HEAD -- "${@}" 2>/dev/null || req rm -f -- "${@}"
elif [ ${SC_VCS} = svn ]; then
req rm -f -- "${@}"
svn revert -- "${@}" >/dev/null