Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 1 addition & 6 deletions src/scmrepo/git/backend/dulwich/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down