On Tue, 20 Jun 2006 02:50:08 -0700, Junio C Hamano wrote: > > 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 Another one that a colleague of mine hit is: git checkout -b branch-without-file branch-with-file git rm some-file # Allow for some external changes on branch-with-file git pull . branch-with-file One possibility for fixing this case is to make git-rm delete the file by default, (that is, act as if the current -f option is passed). There's no real safety concern unless the file is dirty, (could require -f again for that case). > If this works out for Jeff, I can simply drop > the "core.oktoclobber = ask" patch from my topics -- although > I kind of liked that one ;-). Fixing the behavior instead of adding configuration is definitely a good plan. -Carl
Attachment:
pgppNmsRPxy0H.pgp
Description: PGP signature