From: Junio C Hamano Date: Tue, 26 Mar 2013 21:40:57 GMT Subject: Re: [PATCH 8/9] clone: die on errors from unpack_trees Message-ID: <7vtxnxsuty.fsf@alter.siamese.dyndns.org> In-Reply-To: <20130325202359.GH16019@sigill.intra.peff.net> Jeff King writes: > When clone is populating the working tree, it ignores the > return status from unpack_trees; this means we may report a > successful clone, even when the checkout fails. > > When checkout fails, we may want to leave the $GIT_DIR in > place, as it might be possible to recover the data through > further use of "git checkout" (e.g., if the checkout failed > due to a transient error, disk full, etc). However, we > already die on a number of other checkout-related errors, so > this patch follows that pattern. > > In addition to marking a now-passing test, we need to adjust > t5710, which blindly assumed it could make bogus clones of > very deep alternates hierarchies. By using "--bare", we can > avoid it actually touching any objects. > > Signed-off-by: Jeff King > --- Thanks. > I think the "leave the data behind" fix may be to just set "junk_pid = > 0" a little sooner in cmd_clone (i.e., before checkout()). Then we > would still die, but at least leave the fetched objects intact. Yeah, perhaps, but I agree that is a much lower priority change.