build: Report normal Git hash

Commit 3d782180ea changed the reported Git
hash to short.  Change this back to the normal Git hash.  Existing
support code may rely on this.  The short hash is generated based on the
current repository state.  The reported hash should be useful also for
future states of the repository.  If Git changes the hash algorithm in
the future, then the hash length may be used as an indicator for the
hash algorithm.  With a variable hash length this is more difficult.

Simplify expression.

Update #5037.
This commit is contained in:
Sebastian Huber
2024-11-04 00:51:53 +01:00
committed by Kinsey Moore
parent e53dfabe36
commit ae7a21c5e9

View File

@@ -71,9 +71,9 @@ def get_repo_release_label(ctx):
try:
modified = ctx.cmd_and_log("git ls-files --modified",
quiet=Context.BOTH).strip()
release_label = ctx.cmd_and_log("git rev-parse --short HEAD",
release_label = ctx.cmd_and_log("git rev-parse HEAD",
quiet=Context.BOTH).strip()
if len(modified) != 0:
if modified:
release_label += "-modified"
except WafError:
pass