build: Fixup Git dirty detector

This commit is contained in:
Matt Borgerson 2019-07-04 00:20:16 -07:00
parent 973a0c0409
commit 130965646a

View File

@ -93,7 +93,7 @@ QEMU_PKGVERSION := $(if $(PKGVERSION),$(PKGVERSION),$(shell \
cd $(SRC_PATH); \
if test -e .git; then \
git rev-parse --short HEAD 2>/dev/null | tr -d '\n'; \
if ! git diff-index --quiet HEAD &>/dev/null; then \
if ! git diff --quiet HEAD &>/dev/null; then \
echo "-dirty"; \
fi; \
fi))