Skip to content

Commit 76cb129

Browse files
committed
Step: Fix pre-commit script to detect staged files and set executable bit
1 parent bb1bcc7 commit 76cb129

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.gemini/hooks/pre-commit.py

100644100755
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ def main():
1313
journal_path = f"journal/{today}.md"
1414

1515
# Scan for changes (staged, modified, untracked)
16-
# git ls-files --modified --others --exclude-standard
17-
res = run_command("git ls-files --modified --others --exclude-standard")
18-
changed_files = res.stdout.strip().splitlines()
16+
# git status --porcelain shows all changes
17+
res = run_command("git status --porcelain")
18+
changed_files = [line[3:] for line in res.stdout.strip().splitlines() if line]
1919

2020
if not changed_files:
2121
return 0

0 commit comments

Comments
 (0)