summaryrefslogtreecommitdiff
path: root/version_detection.mk
diff options
context:
space:
mode:
authorJRPan <[email protected]>2023-02-11 13:33:51 -0500
committerJRPan <[email protected]>2023-02-11 13:33:51 -0500
commite3483ab6cd79a721e60c403dc4ebadb38ba24391 (patch)
tree71d86f73eba0e740af41b0985e5f8f11a66f2a49 /version_detection.mk
parent13c67115070dc2f0876254a790d0238073ca364a (diff)
truncate the commit hash
Diffstat (limited to 'version_detection.mk')
-rw-r--r--version_detection.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/version_detection.mk b/version_detection.mk
index ee71a62..81c1d2a 100644
--- a/version_detection.mk
+++ b/version_detection.mk
@@ -32,7 +32,7 @@ else
GPGPUSIM_VERSION=$(shell cat $(GPGPUSIM_ROOT)/version | awk '/Version/ {print $$8}' )
#Detect Git branch and commit #
-GIT_COMMIT := $(shell git log -n 1 | head -1 | sed -re 's/commit (.*)/\1/')
+GIT_COMMIT := $(shell git log --abbrev-commit -n 1 | head -1 | sed -re 's/commit (.*)/\1/')
GIT_FILES_CHANGED_A:=$(shell git diff --numstat | wc | sed -re 's/^\s+([0-9]+).*/\1./')
GIT_FILES_CHANGED:= $(GIT_FILES_CHANGED_A)$(shell git diff --numstat --cached | wc | sed -re 's/^\s+([0-9]+).*/\1/')
GPGPUSIM_BUILD := gpgpu-sim_git-commit-$(GIT_COMMIT)_modified_$(GIT_FILES_CHANGED)