On a clean just-cloned repo, git-diff-index has no local index to compare with, leading to all files being marked as new on some systems. git-diff on the other hand actually compares the files contents with the repository tree and then updates said local index. This problem was found when trying to automate xqemu builds (an xbox emulator based on qemu) through the use of AppVeyor.
Signed-off-by: Lucas Eriksson <dr...@dracc.se> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2da686be33..7b48c43734 100644 --- a/Makefile +++ b/Makefile @@ -446,7 +446,7 @@ qemu-version.h: FORCE else \ if test -d .git; then \ pkgvers=$$(git describe --match 'v*' 2>/dev/null | tr -d '\n');\ - if ! git diff-index --quiet HEAD &>/dev/null; then \ + if ! git diff --quiet HEAD >/dev/null 2>&1; then \ pkgvers="$${pkgvers}-dirty"; \ fi; \ fi; \ -- 2.18.0