VCS functions returned "<unknown>" when no repo was found, but
the tests guarded on IsEmpty(), so assertions ran against the
sentinel string and failed. This happened whenever the build
directory lived outside the source tree.
Move the "<unknown>" fallback from the VCS data layer up to the
parser's presentation layer. The VCS functions now return empty
strings on failure, and the parser applies the display fallback.
Rewrite the test fixture to create a temporary git repo with a
known commit, author, and email. Tests no longer depend on the
ambient git environment and produce deterministic results from
any build directory.
Expose version control system metadata through text evaluation expressions,
allowing text fields to reference VCS information dynamically.
This is useful for placing up to date version information on PCB
silkscreen or in other design text fields.
Added functions (vcs* prefix for VCS-agnostic naming):
- vcsidentifier([length]) - HEAD commit identifier (default: full hash)
- vcsfileidentifier(file, [length]) - last commit identifier that modified file
- vcsnearestlabel([match], [anyTags]) - nearest tag/label from HEAD
- vcslabeldistance([match], [anyTags]) - commits since nearest tag
- vcsdirty([includeUntracked]) - "1" if dirty, "0" if clean
- vcsdirtysuffix([suffix], [includeUntracked]) - suffix if dirty, empty if clean
- vcsbranch() - current branch name
- vcsauthor() - HEAD commit author name
- vcsauthoremail() - HEAD commit author email
- vcscommitter() - HEAD commit committer name
- vcscommitteremail() - HEAD commit committer email
- vcscommitdate([format]) - HEAD commit date
- vcsfileauthor(file) - author of last commit that modified file
- vcsfileauthoremail(file) - author email of last commit that modified file
- vcsfilecommitter(file) - committer of last commit that modified file
- vcsfilecommitteremail(file) - committer email of last commit that modified file
- vcsfilecommitdate(file, [format]) - date of last commit that modified file
Date format options: "ISO", "US", "EU", "Chinese", "Japanese", "Korean",
"long", "short".
Signed-off-by: Matthias Breithaupt <m.breithaupt@vogl-electronic.com>