From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [OSSTEST PATCH] build_clone: git clean newly cloned trees Date: Mon, 2 Nov 2015 14:19:17 +0000 Message-ID: <1446473957.3088.48.camel@citrix.com> References: <1446134260-13253-1-git-send-email-ian.jackson@eu.citrix.com> <563242C0.4040701@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZtFxG-0000xn-R2 for xen-devel@lists.xenproject.org; Mon, 02 Nov 2015 14:19:26 +0000 In-Reply-To: <563242C0.4040701@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Ian Jackson , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Thu, 2015-10-29 at 16:01 +0000, Andrew Cooper wrote: > On 29/10/15 15:57, Ian Jackson wrote: > > This may seem redundant, however: > > > > git does not track empty directories. So it can happen that a > > directory is created as part of `git clone', but is empty in the > > revision switched to with `git checkout'. > > > > In this situation, the tree we are going to build ought not to contain > > this directory, because that directory will not (in general) be > > produced, eg when the revision being switched to becomes master. > > > > We can use git clean to produce a working tree whose contents - > > including the presence or absence of empty directories - depends only > > on the commit we are trying to check out, and not on the previous > > states of the git history or working tree. > > > > For example, if a directory is made empty (ie, deleted, since git does > > not distinguish) in xen.git#staging, osstest's clones of > > xen.git#master will produce the directory, but `git checkout' of > > staging won't delete it. If the xen.git build system mistakenly > > depends on this directory, we won't detect this until the deletion > > reaches master. This situation actually occurred with xen.git#598e97f > > "tools/python: remove broken xl binding" (fixed in b261366f). > > > > Signed-off-by: Ian Jackson > > CC: Andrew Cooper > > Reviewed-by: Andrew Cooper Acked-by: Ian Campbell