fix: stage files before checking for changes

Previously git diff checked unstaged changes, so new untracked files
(like the new Abstimmungen/ directory) would not trigger a commit.
Now stages first, then checks the staged diff.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Marco Lents 2026-04-13 22:51:01 +02:00
parent fb38bb5894
commit 64c75f9b1f

View file

@ -155,11 +155,11 @@ def main():
if args.no_git:
return
if repo.git.diff(name_only=True) == "":
repo.git.add("*")
if repo.git.diff("--cached", name_only=True) == "":
return
message = generate_commit_message(old_bios, bios)
repo.git.add("*")
repo.index.commit(message)
origin = repo.remote(name="origin")
origin.push()