dancor on #git just noticed a bug in read-tree -m that prevents him from switching branches when the type of a path changes between a directory and a file. The following test appears to trigger the same failure, but I likely won't have time to fix it myself tonight. So if someone else gets a chance... diff --git a/t/t9999-typechange.sh b/t/t9999-typechange.sh new file mode 100755 index 0000000..dc92094 --- /dev/null +++ b/t/t9999-typechange.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +test_description='switch branches over path typechange' + +. ./test-lib.sh + +test_expect_success setup ' + : >A && + git-add A && + tree1=$(git-write-tree) && + comm1=$(echo A | git-commit-tree $tree1) && + git-update-ref refs/heads/comm1 $comm1 && + rm .git/index && + rm -f A && + mkdir A && + echo : >A/A && + git-add A/A && + tree2=$(git-write-tree) && + comm2=$(echo A/A | git-commit-tree $tree2) && + git-update-ref HEAD $comm2 +' + +test_expect_success checkout 'git-checkout $comm1' + +test_done -- Shawn. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html