diff --git a/pyproject.toml b/pyproject.toml index 12f66852..cfe3fae5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ requires-python = ">=3.9" dynamic = ["version"] dependencies = [ "gitpython>3", - "dulwich>=0.23.1", + "dulwich>=0.24.0", "pygit2>=1.14.0", "pygtrie>=2.3.2", "fsspec[tqdm]>=2024.2.0", diff --git a/src/scmrepo/git/backend/dulwich/__init__.py b/src/scmrepo/git/backend/dulwich/__init__.py index 2c24b6f5..f75d27ae 100644 --- a/src/scmrepo/git/backend/dulwich/__init__.py +++ b/src/scmrepo/git/backend/dulwich/__init__.py @@ -382,7 +382,7 @@ def commit(self, msg: str, no_verify: bool = False): with reraise((Error, CommitError), SCMError("Git commit failed")): try: - commit(self.root_dir, message=msg, no_verify=no_verify) + commit(self.repo, message=msg, no_verify=no_verify) except InvalidUserIdentity as exc: raise SCMError("Git username and email must be configured") from exc except TimezoneFormatError as exc: @@ -425,7 +425,7 @@ def branch(self, branch: str): from dulwich.porcelain import Error, branch_create try: - branch_create(self.root_dir, branch) + branch_create(self.repo, branch) except Error as exc: raise SCMError(f"Failed to create branch '{branch}'") from exc @@ -909,7 +909,7 @@ def status( with reraise(Error, SCMError("Git status failed")): staged, unstaged, untracked = git_status( - self.root_dir, ignored=ignored, untracked_files=untracked_files + self.repo, ignored=ignored, untracked_files=untracked_files ) return ( diff --git a/tests/test_git.py b/tests/test_git.py index 7141a451..a5bd1eb7 100644 --- a/tests/test_git.py +++ b/tests/test_git.py @@ -921,7 +921,7 @@ def test_ignored(tmp_dir: TmpDir, scm: Git, git: Git, git_backend: str): assert not git.is_ignored(tmp_dir / "dir1" / "file2.txt") -@pytest.mark.skip_git_backend("pygit2", "gitpython", "dulwich") +@pytest.mark.skip_git_backend("pygit2", "gitpython") def test_ignored_dir_unignored_subdirs(tmp_dir: TmpDir, scm: Git, git: Git): tmp_dir.gen({".gitignore": "data/**\n!data/**/\n!data/**/*.csv"}) scm.add([".gitignore"])