1
0
Fork 0

Merging upstream version 2.11.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 21:25:27 +01:00
parent e1036806b7
commit b40b2e7e52
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
33 changed files with 586 additions and 19 deletions

View file

@ -38,6 +38,17 @@ def test_get_root_bare_worktree(tmpdir):
assert git.get_root() == os.path.abspath('.')
def test_get_root_worktree_in_git(tmpdir):
src = tmpdir.join('src').ensure_dir()
cmd_output('git', 'init', str(src))
git_commit(cwd=str(src))
cmd_output('git', 'worktree', 'add', '.git/trees/foo', 'HEAD', cwd=src)
with src.join('.git/trees/foo').as_cwd():
assert git.get_root() == os.path.abspath('.')
def test_get_staged_files_deleted(in_git_dir):
in_git_dir.join('test').ensure()
cmd_output('git', 'add', 'test')