summaryrefslogtreecommitdiff
path: root/daemon.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-06-20 09:47:14 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-06-21 05:21:11 (GMT)
commit4170af82328e50a75723cee084ae779e7a882b9d (patch)
treef232646ffc27f5f6e850e3fe75d4922f1d52933f /daemon.c
parent5b276ee4fb01a5c3cf4970df69d319a3c93c81c9 (diff)
downloadgit-4170af82328e50a75723cee084ae779e7a882b9d.zip
git-4170af82328e50a75723cee084ae779e7a882b9d.tar.gz
git-4170af82328e50a75723cee084ae779e7a882b9d.tar.bz2
checkout -f: do not leave untracked working tree files.
Earlier we did not consider untracked working tree files "precious", but we have always considered them fair game to clobber. These days, branch switching by read-tree is more careful and tries to protect untracked working tree files. This caused the following workflow to stop working: git checkout one-branch-with-file-F git checkout -f another-without-file-F git pull . one-branch-with-file-F Because the second checkout leaves F from the previous state as untracked file in the working tree, the merge would fail, trying to protect F from being clobbered. This changes "git checkout -f" to remove working tree files that are known to git in the switched-from state but do not exist in the switched-to state, borrowing the same logic from "reset --hard". Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'daemon.c')
0 files changed, 0 insertions, 0 deletions