build_version.py: builds with staged but uncommitted changes are now marked dirty (+)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-12-03 22:28:49 +01:00
1 parent 6da05693a0
commit 504021f2c7
1 file changed
+3 -1
+3 -1
View File
@@ -70,7 +70,9 @@ except Exception:
sha, dirty = "nogit", ""
try:
sha = git(cwd, "rev-parse", "--short=7", "HEAD")
if subprocess.call(["git", "diff", "--quiet"], cwd=cwd) != 0:
# against HEAD: staged changes count too (a plain `git diff` sees only
# unstaged ones, so a build from a staged tree came out as a clean commit)
if subprocess.call(["git", "diff", "--quiet", "HEAD"], cwd=cwd) != 0:
dirty = "+"
except Exception:
pass