On 22/11/15 10:08PM, Ævar Arnfjörð Bjarmason wrote: > > > +test_expect_success '"add --orphan" fails if the branch already exists' ' > > + test_when_finished "git branch -D existingbranch" && > > + test_when_finished "git worktree remove -f -f orphandir" && > > + git worktree add -b existingbranch orphandir main && > > + test_must_fail git worktree add --orphan existingbranch orphandir2 && > > + test ! -d orphandir2 > > I'm not sure about "worktree" behavior, but maybe this "test ! -d" wants > to be a "test_path_is_missing"? > > In general we try to test what a thing is, not what it isn't, in this > case don't we fail to create the dir entirely? So "not exists" would > cover it? Ah yes that would be preferable. I've updated it for v4. This shows up in the file in a few other places in this file as well (from before this patch). Should I make the changes there as well and put those changes into an additional patch in this patchset?