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 @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions src/scmrepo/git/backend/dulwich/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion tests/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down
Loading