From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id BE6081F8C8 for ; Thu, 23 Sep 2021 18:05:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242659AbhIWSHS (ORCPT ); Thu, 23 Sep 2021 14:07:18 -0400 Received: from pb-smtp20.pobox.com ([173.228.157.52]:55415 "EHLO pb-smtp20.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238811AbhIWSHR (ORCPT ); Thu, 23 Sep 2021 14:07:17 -0400 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 4E7ED149FE4; Thu, 23 Sep 2021 14:05:45 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:message-id:mime-version:content-type; s=sasl; bh=CPy7mjAjgtURKCxNuDTxLT/51gyf63YXe3fqcMynLEg=; b=M9Wg JOfuZaN5Rk3YGCXJSmyefmzp8VR0xgfDw8glsodZKgelEfp1IZF+5uxmEM55e/aM uZ1k8tEIGtyMHpVJKOHJkfFQBypyZx5hnh0f+xWFb7F2i7sPtXCvuNTPJFImPPS+ V0SCor20eCo6s/EqRH/3soKM/yVqgpxCJ7Epr2E= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 48035149FE3; Thu, 23 Sep 2021 14:05:45 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [104.133.2.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id AB9D6149FE1; Thu, 23 Sep 2021 14:05:42 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Jonathan Tan Cc: git@vger.kernel.org Subject: Re: [PATCH 0/9] No more adding submodule ODB as alternate References: Date: Thu, 23 Sep 2021 11:05:41 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: DE061824-1C98-11EC-94EF-F327CE9DA9D6-77302942!pb-smtp20.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Jonathan Tan writes: > This series is on jt/add-submodule-odb-clean-up. > > After this series, the entire test suite runs without ever adding a > submodule ODB as an alternate (checked by running with > GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB=1). The code to lazily add > submodule ODBs as alternates still remains (with a trace message printed > if it happens) just in case there is a rare interaction that the test > suite doesn't cover. > > This is part of my effort to support partial clone in submodules, but > the results here are also beneficial for non-partial-clone submodule > users in that access to submodule objects are now quicker (because Git > no longer needs to linearly search through alternates when accessing > these objects). It also improves code health in that it is clearer at > the call site when a submodule object is being accessed. Nice. One specially bad thing about the alternate odb abuse is that it is very hard to undo once you add an odb that is not really an alternate as if it were an alternate. Accessing the objects from the repository the objects should be found, keeping clear separation between the superproject and its submodule, which is done here, is the right thing to do. Unconfortably excited.