From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF6B33B8D6D for ; Wed, 19 Aug 2026 17:42:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.148 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787161369; cv=none; b=HGqbujqJIcUX5t+uBCx4HM4JnumCiC3Bo3aB7ncfBO9l+yBxfw5aGZYD1Uvf8DU0iKFWRr2Z42vnHRWnzlh7XrHuq/u+KnCyrgkQpUsbcmpaajTDV3OjsenVsJgPowv5hn4InIejKaqsN+zBSQaW5DAv21RtYdzT+hLKz3H++2A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787161369; c=relaxed/simple; bh=VmnSzt7pxYoCgFnHgv4UDRrYWa3X7NCtjIEHglqZFPk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=sMUBfXdtsarzeFBU4GO4v5hKivKTeN34Bg5E6Ck/GFPHAVtq2rnf6Z+4JB5hRWHDyETYNYwjoDk7nJ6HM2qi92uJ+CMa0yl/E3FcAqhnwntathtf/ZxUJUKAI5GtonR/bLhO0ixEtEDIlCjJpW97eJRmAPIm0ow3qZegEhn8YAw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=FczGMIsY; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=a/4qwiK8; arc=none smtp.client-ip=202.12.124.148 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="FczGMIsY"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="a/4qwiK8" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id A69351D00101; Wed, 19 Aug 2026 13:42:46 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-04.internal (MEProxy); Wed, 19 Aug 2026 13:42:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1787161366; x=1787247766; bh=uBIswMgfNx kC109qs+T796RAmxZo2agGilvAGhevAug=; b=FczGMIsYeK9K++cs3w36HY+/z8 lA+Op+GG3ZXyII6VNMEH4azz270WOVkf6mWHtLDZNMEJHfv1jDekvfIdNGTRtscE VE/FnGeIHrmJht6rePjRhfx6z3nw+YOuVS4UhQcEAAFdg4J4X9+WOa7iUP2zIV7f 2EwK4yaoH2It7NVoS9csXG7BMIzX69eH4nTHi+UTcFAhZsQjWU4APAXQZQAFbTOa 3CkgSsEgi3YmU7rA/z4Ds2iY262paeXS+W6o9iDib1qIYStHbCLfaXmSBE5+FR26 +zj8mwvbUc7uIOTzWWer+39cdeHG4KR0MBtDwviZWc+d5e2zql2bcjzr2FvQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1787161366; x=1787247766; bh=uBIswMgfNxkC109qs+T796RAmxZo2agGilv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qUwYA X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Aug 2026 13:42:45 -0400 (EDT) From: Junio C Hamano To: Patrick Steinhardt Cc: git@vger.kernel.org, Taylor Blau Subject: Re: [PATCH 3/7] odb/source-packed: flag known-bad objects as corrupt and not missing In-Reply-To: (Patrick Steinhardt's message of "Wed, 19 Aug 2026 12:01:28 +0200") References: <20260818-pks-odb-generic-corrupt-objects-v1-0-ec234567510f@pks.im> <20260818-pks-odb-generic-corrupt-objects-v1-3-ec234567510f@pks.im> Date: Wed, 19 Aug 2026 10:42:44 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Patrick Steinhardt writes: > On Tue, Aug 18, 2026 at 11:17:47AM -0700, Junio C Hamano wrote: >> Patrick Steinhardt writes: >> > @@ -618,8 +619,11 @@ int fill_midx_entry(struct multi_pack_index *m, >> > return 0; >> > >> > if (oidset_size(&p->bad_objects) && >> > - oidset_contains(&p->bad_objects, oid)) >> > + oidset_contains(&p->bad_objects, oid)) { >> > + if (bad_pack && !*bad_pack) >> > + *bad_pack = p; >> > return 0; >> > + } >> >> Hmph, so the idea is that if you have even one bad thing, you are >> marked as bad, because who knows what other parts of you are broken? > > No, not quite. We don't mark the whole pack itself as bad, we only mark > the objects that's contained in there as bad. The only reason why we > also bubble up the pack is so that we can provide a better error message > in a subsequent commit, where we can then tell the user which pack it > was specifically that contains the bad commit. > > That's by itself not visible in this commit yet, but I do mention it as > part of the commit message. > > Patrick OK. This is a tangent but the argument heavily relies on the invariant that a single pack can contain one object at most once. Once a corrupt pack that has copies of the same object duplicated in it comes into the picture, the error message has to say which copy is bad.