docker: ignore submodules when checking diff
A message that is not in the archive (sent off-list or not yet received): [email protected]
RFC PATCH 1/2 docker: fix dirty/stash detection on some systems
I reported this a while ago but evidently forgot to push the patch upstream. Without this I wasn't seeing the dirty tree state submitted to the docker build which is very confusing.
Reference:
Subject: [PATCH 1/6] tests/docker/Makefile.include: fix diff-index call
Date: Fri, 28 Oct 2016 17:33:34 +0100
Message-Id: <[email protected]>
--- tests/docker/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/Makefile.include +1 -1
@@ -20,7 +20,7 @@ IMAGES ?= % # Make archive from git repo $1 to tar.gz $2 make-archive-maybe = $(if $(wildcard $1/*), \ $(call quiet-command, \ - (cd $1; if git diff-index --quiet HEAD -- &>/dev/null; then \ + (cd $1; if git diff-index --quiet HEAD -- 2>/dev/null; then \ git archive -1 HEAD --format=tar.gz; \ else \ git archive -1 $$(git stash create) --format=tar.gz; \
Signature · 1 line
2.13.0
RFC PATCH 2/2 docker: ignore submodules when checking diff
In reply to a message not in the archiveThe QEMU tree often has dirty submodules in it but this will confuse things as git stash is not going to save their state directly. They are likely just dirty from build files anyway. Ignore them in the diff-index command.
--- tests/docker/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/Makefile.include +1 -1
@@ -20,7 +20,7 @@ IMAGES ?= % # Make archive from git repo $1 to tar.gz $2 make-archive-maybe = $(if $(wildcard $1/*), \ $(call quiet-command, \ - (cd $1; if git diff-index --quiet HEAD -- 2>/dev/null; then \ + (cd $1; if git diff-index --quiet --ignore-submodules HEAD -- 2>/dev/null; then \ git archive -1 HEAD --format=tar.gz; \ else \ git archive -1 $$(git stash create) --format=tar.gz; \
Signature · 1 line
2.13.0