Build system modifies tracked src/gitversion.h.in
#139
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation
src/gitversion.h.inis a git-tracked file that the build system (make)modifies in-place on every build. This causes uncommitted changes to appear
in the working tree after running
make, which:git checkoutto another branch showssrc/gitversion.h.inas modified; switching requiresgit checkout -- src/gitversion.h.inor
git restore src/gitversion.h.into clear the changes first..gitversion.h.inis merged while the file has local modifications, conflicts arise.
git status— every build after a clean checkout shows dirtyworking tree, making it hard to track actual source changes.
when switching branches or after running
make.Root cause
The Makefile has a rule that deletes and recreates
src/gitversion.h.infrom scratch on every build:
This rule writes concrete values (e.g.
"feat/autoping-warning","b5bbad8d")directly into the tracked
.infile, instead of using it as a static templatewith
@VAR@placeholders.The file is listed in
.gitignore(line 45) but remains tracked because.gitignoreonly affects untracked files — already-tracked files are notignored.
Acceptance Criteria
makeinvocation does not cause git-tracked change insrc/gitversion.h.injabber.developer referenced this issue2026-06-23 12:29:16 +00:00