From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: [PATCH 1/5] t5312: test object deletion code paths in a corrupted repository Date: Tue, 17 Mar 2015 03:28:45 -0400 Message-ID: <20150317072844.GA25191@peff.net> References: <20150317072750.GA22155@peff.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Michael Haggerty To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Tue Mar 17 08:28:54 2015 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YXlvo-0003vx-MY for gcvg-git-2@plane.gmane.org; Tue, 17 Mar 2015 08:28:53 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751895AbbCQH2s (ORCPT ); Tue, 17 Mar 2015 03:28:48 -0400 Received: from cloud.peff.net ([50.56.180.127]:33911 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750958AbbCQH2r (ORCPT ); Tue, 17 Mar 2015 03:28:47 -0400 Received: (qmail 25532 invoked by uid 102); 17 Mar 2015 07:28:47 -0000 Received: from Unknown (HELO peff.net) (10.0.1.1) by cloud.peff.net (qpsmtpd/0.84) with SMTP; Tue, 17 Mar 2015 02:28:47 -0500 Received: (qmail 22775 invoked by uid 107); 17 Mar 2015 07:28:58 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) by peff.net (qpsmtpd/0.84) with SMTP; Tue, 17 Mar 2015 03:28:58 -0400 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Tue, 17 Mar 2015 03:28:45 -0400 Content-Disposition: inline In-Reply-To: <20150317072750.GA22155@peff.net> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: When we are doing a destructive operation like "git prune", we want to be extra careful that the set of reachable tips we compute is valid. If there is any corruption or oddity, we are better off aborting the operation and letting the user figure things out rather than plowing ahead and possibly deleting some data that cannot be recovered. The tests here include: 1. Pruning objects mentioned only be refs with invalid names. This used to abort prior to d0f810f (refs.c: allow listing and deleting badly named refs, 2014-09-03), but since then we silently ignore the tip. Likewise, we test repacking that can drop objects (either "-ad", which drops anything unreachable, or "-Ad --unpack-unreachable=