diff --git a/pyproject.toml b/pyproject.toml index 3950d7a..49129d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ requires-python = ">=3.9" dynamic = ["version"] dependencies = [ "gitpython>3", - "dulwich>=0.24.0", + "dulwich>=0.24.3", "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 654f760..bb30972 100644 --- a/src/scmrepo/git/backend/dulwich/__init__.py +++ b/src/scmrepo/git/backend/dulwich/__init__.py @@ -369,18 +369,13 @@ def _expand_paths(self, paths: list[str], force: bool = False) -> Iterator[str]: yield rel def commit(self, msg: str, no_verify: bool = False): - from dulwich import __version__ as dulwich_version from dulwich.errors import CommitError from dulwich.porcelain import Error, TimezoneFormatError, commit from dulwich.repo import InvalidUserIdentity - commit_kwargs: dict[str, Any] = {} - if dulwich_version >= (0, 24, 3): - commit_kwargs["sign"] = False - with reraise((Error, CommitError), SCMError("Git commit failed")): try: - commit(self.repo, message=msg, no_verify=no_verify, **commit_kwargs) + commit(self.repo, message=msg, no_verify=no_verify, sign=False) except InvalidUserIdentity as exc: raise SCMError("Git username and email must be configured") from exc except TimezoneFormatError as exc: