fpga: tools: mark hash dirty with staged changes

Original-commit: d635ee91fb34fa1fbb0c70a23337f4ea5a05cc1f
This commit is contained in:
Max Köhler
2025-01-29 11:37:22 +01:00
committed by Jörg Hofrichter
parent 8d46198250
commit 067f150b75
+2 -2
View File
@@ -43,7 +43,7 @@ if [[ $write -eq 0 ]]; then
short_hash="$(git rev-parse --verify HEAD --short=7 2>/dev/null)" && git_success=1
if [[ $git_success -eq 1 ]]; then
# Check if tree is clean. If yes, the top 4 bits are 0
if (git diff --quiet 2>/dev/null); then
if [[ -z $(git status --porcelain --untracked-files=no 2>/dev/null) ]]; then
ettus_githash32="0$short_hash"
else
ettus_githash32="f$short_hash"
@@ -64,7 +64,7 @@ else
# Get hash from git
short_hash="$(git rev-parse --verify HEAD --short=7 2>/dev/null)" || { echo "ERROR: Not a git tree"; exit 2; }
# Check if tree is clean. If yes, the top 4 bits are 0
if (git diff --quiet 2>/dev/null); then
if [[ -z $(git status --porcelain --untracked-files=no 2>/dev/null) ]]; then
ettus_githash32="0$short_hash"
else
ettus_githash32="f$short_hash"