From 62049c0be44cd98d85fd6f7a8546dbd6c50942de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Mon, 28 Jul 2025 16:19:52 +0545 Subject: [PATCH] unskip test_ignored_dir_unignored_subdirs test Fixed upstream: https://github.com/jelmer/dulwich/pull/1728. --- pyproject.toml | 2 +- src/scmrepo/git/backend/dulwich/__init__.py | 6 +++--- tests/test_git.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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"])