From ae7a21c5e9a34589457dd81c29259c8b5ba90568 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 4 Nov 2024 00:51:53 +0100 Subject: [PATCH] build: Report normal Git hash Commit 3d782180eae14d8d9666ff8f9584b6fba7772804 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. --- wscript | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wscript b/wscript index a0d0b6b57f..03493fdab7 100755 --- a/wscript +++ b/wscript @@ -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