Use 'git checkout HEAD' instead of reset+checkout.
Thanks for the suggestion to Jonathan Callen.
This commit is contained in:
parent
671838fee9
commit
0dca83a452
@ -174,8 +174,7 @@ check_for_changes() {
|
|||||||
# Discard any changes to a particular set of files.
|
# Discard any changes to a particular set of files.
|
||||||
vcs_reset() {
|
vcs_reset() {
|
||||||
if [ ${SC_VCS%-svn} = git ]; then
|
if [ ${SC_VCS%-svn} = git ]; then
|
||||||
req git reset -q HEAD -- "${@}"
|
git checkout HEAD -- "${@}" 2>/dev/null || req rm -f -- "${@}"
|
||||||
git checkout -f -- "${@}" 2>/dev/null || req rm -f -- "${@}"
|
|
||||||
elif [ ${SC_VCS} = svn ]; then
|
elif [ ${SC_VCS} = svn ]; then
|
||||||
req rm -f -- "${@}"
|
req rm -f -- "${@}"
|
||||||
svn revert -- "${@}" >/dev/null
|
svn revert -- "${@}" >/dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user