From abc02670169cee9541793a86324a014272ca8ed5 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 28 Jun 2006 11:47:28 -0700 Subject: checkout -m: fix read-tree invocation When we updated "read-tree -m -u" to be careful about not removing untracked working tree files, we broke "checkout -m" to switch between branches. Signed-off-by: Junio C Hamano --- git-checkout.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'git-checkout.sh') diff --git a/git-checkout.sh b/git-checkout.sh index 77c2593809..5613bfc403 100755 --- a/git-checkout.sh +++ b/git-checkout.sh @@ -150,8 +150,7 @@ else # Match the index to the working tree, and do a three-way. git diff-files --name-only | git update-index --remove --stdin && work=`git write-tree` && - git read-tree --reset $new && - git checkout-index -f -u -q -a && + git read-tree --reset -u $new && git read-tree -m -u --aggressive $old $new $work || exit if result=`git write-tree 2>/dev/null` -- cgit v1.2.3