| test_description='selecting remote repo in ambiguous cases' |
| rm -rf foo foo.git fetch clone |
| (cd "$1" && test_commit "$1") |
| tree=$(git hash-object -w -t tree /dev/null) && |
| commit=$(echo "$1" | git commit-tree $tree) && |
| git update-ref HEAD $commit |
| (cd fetch && git fetch "../$1") && |
| (cd fetch && git log -1 --format=%s FETCH_HEAD) >actual.fetch && |
| (cd clone && git log -1 --format=%s HEAD) >actual.clone && |
| test_cmp expect actual.fetch && |
| test_cmp expect actual.clone |
| test_expect_success 'find .git dir in worktree' ' |
| test_expect_success 'automagically add .git suffix' ' |
| test_expect_success 'automagically add .git suffix to worktree' ' |
| test_expect_success 'prefer worktree foo over bare foo.git' ' |
| test_expect_success 'prefer bare foo over bare foo.git' ' |
| test_expect_success 'disambiguate with full foo.git' ' |
| test_expect_success 'we are not fooled by non-git foo directory' ' |
| test_expect_success 'prefer inner .git over outer bare' ' |