From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bA6xZ-0001ms-48 for qemu-devel@nongnu.org; Mon, 06 Jun 2016 22:41:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bA6xU-0001xI-69 for qemu-devel@nongnu.org; Mon, 06 Jun 2016 22:41:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bA6xU-0001xE-0g for qemu-devel@nongnu.org; Mon, 06 Jun 2016 22:41:36 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5ECD28553B for ; Tue, 7 Jun 2016 02:41:35 +0000 (UTC) Date: Tue, 7 Jun 2016 10:41:30 +0800 From: Fam Zheng Message-ID: <20160607024130.GA2273@ad.usersys.redhat.com> References: <1465224417-141321-1-git-send-email-pbonzini@redhat.com> <1465224417-141321-2-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1465224417-141321-2-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/6] tests/docker: fix make-archive-maybe List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Mon, 06/06 16:46, Paolo Bonzini wrote: > make-archive-maybe expects an archive path relative > to $1, but receives a path relative to the current directory. Redirect > the output outside the subshell to bypass the "cd $1". > > Signed-off-by: Paolo Bonzini > --- > tests/docker/Makefile.include | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include > index 2fd2ca3..d0ad36c 100644 > --- a/tests/docker/Makefile.include > +++ b/tests/docker/Makefile.include > @@ -21,10 +21,10 @@ IMAGES ?= % > make-archive-maybe = $(if $(wildcard $1/*), \ > $(call quiet-command, \ > (cd $1; if git diff-index --quiet HEAD -- &>/dev/null; then \ > - git archive -1 HEAD --format=tar.gz -o $2; \ > + git archive -1 HEAD --format=tar.gz; \ > else \ > - git archive -1 $$(git stash create) --format=tar.gz -o $2; \ > - fi), \ > + git archive -1 $$(git stash create) --format=tar.gz; \ > + fi) > $2, \ > " ARCHIVE $(notdir $2)")) > > CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$) > -- > 1.8.3.1 > > I think this is better than my patch because it also reduces the duplication between the two "git archive" commands a little. So I'm dropping mine. Fam