qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PATCH] Makefile: Don't add -dirty to pkgversion when tre


From: Lucas Eriksson
Subject: [Qemu-trivial] [PATCH] Makefile: Don't add -dirty to pkgversion when tree is not dirty
Date: Fri, 3 Aug 2018 14:57:42 +0200
User-agent: Mutt/1.10.0 (2018-05-17)

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 <address@hidden>
---
 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]