(tmpdir)
| 41 | |
| 42 | |
| 43 | def test_get_root_bare_worktree(tmpdir): |
| 44 | src = tmpdir.join('src').ensure_dir() |
| 45 | cmd_output('git', 'init', str(src)) |
| 46 | git_commit(cwd=str(src)) |
| 47 | |
| 48 | bare = tmpdir.join('bare.git').ensure_dir() |
| 49 | cmd_output('git', 'clone', '--bare', str(src), str(bare)) |
| 50 | |
| 51 | cmd_output('git', 'worktree', 'add', 'foo', 'HEAD', cwd=bare) |
| 52 | |
| 53 | with bare.join('foo').as_cwd(): |
| 54 | assert git.get_root() == os.path.abspath('.') |
| 55 | |
| 56 | |
| 57 | def test_get_git_dir(tmpdir): |
nothing calls this directly
no test coverage detected