Fix behaviour if you have a branch named the same as your --prefix
authorAvery Pennarun <apenwarr@gmail.com>
Wed, 26 Aug 2009 14:43:43 +0000 (10:43 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Wed, 26 Aug 2009 14:45:13 +0000 (10:45 -0400)
commit227f78114752eee2e8ae3368089716d73d32dd8b
tree7a0c0f254453c72bc08e1074be0dae8aac20a2e4
parent33aaa697a2386a02002f9fb8439d11243f12e1c7
Fix behaviour if you have a branch named the same as your --prefix

We were trying to 'git checkout $prefix', which is ambiguous if $prefix
names a directory *and* a branch.  Do 'git checkout -- $prefix' instead.

The main place this appeared was in 'git subtree add'.

Reported by several people.
git-subtree.sh
test.sh
todo