From 2bd223f112ef6f4e36815e20ec7b7412c0c076b5 Mon Sep 17 00:00:00 2001 From: Anton M Date: Mon, 23 Feb 2026 00:46:55 +0500 Subject: [PATCH] fix dulwich removed methods --- requirements/base.txt | 2 +- validity/integrations/git.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index f18897e..9f8149c 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -2,7 +2,7 @@ boto3<2 deepdiff>=8.6.1,<9 dimi >=1.5.0,< 2 django-bootstrap5 >=24.2,<25 -dulwich # Core NetBox "optional" requirement +dulwich >=1.1.0,<2 jq>=1.4.0,<2 netmiko>=4.0.0,<5 pydantic>=2.0.0,<3 diff --git a/validity/integrations/git.py b/validity/integrations/git.py index a3ae143..08a2d24 100644 --- a/validity/integrations/git.py +++ b/validity/integrations/git.py @@ -78,7 +78,7 @@ def stage_all(self, local_path: str) -> None: def unstage_all(self, local_path: str) -> None: repo = Repo(local_path) staged_files = chain.from_iterable(porcelain.status(local_path).staged.values()) - repo.unstage(filename.decode() for filename in staged_files) + repo.get_worktree().unstage(filename.decode() for filename in staged_files) def commit(self, local_path: str, username: str, email: str, message: str) -> str: author = f"{username} <{email}>".encode()