Skip to content

Commit 8cd3c56

Browse files
committed
fix: honor staged-only Forge checks
1 parent caaf147 commit 8cd3c56

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

plugins/zagrosi-code/zagrosi-forge/scripts/zagrosi_skills.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3765,12 +3765,13 @@ def changed_files_from_diff(text: str) -> list[str]:
37653765

37663766

37673767
def git_changed_files(repo: Path, staged: bool) -> tuple[list[str], str | None]:
3768-
commands = [
3769-
["diff", "--name-only"],
3770-
["diff", "--name-only", "--cached"],
3771-
]
3768+
commands = [["diff", "--name-only", "--cached"]]
37723769
if not staged:
3773-
commands.append(["ls-files", "--others", "--exclude-standard"])
3770+
commands = [
3771+
["diff", "--name-only"],
3772+
["diff", "--name-only", "--cached"],
3773+
["ls-files", "--others", "--exclude-standard"],
3774+
]
37743775
changed: set[str] = set()
37753776
for command in commands:
37763777
result = git(command, repo)

0 commit comments

Comments
 (0)