From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from mail.zombino.com (c3.zombino.com [91.107.222.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A14394 for ; Mon, 20 Nov 2023 01:43:31 -0800 (PST) Received: from [10.168.5.44] (unknown [81.95.8.245]) by mail.zombino.com (Postfix) with ESMTPS id 4150D912E4; Mon, 20 Nov 2023 09:43:29 +0000 (UTC) Message-ID: Date: Mon, 20 Nov 2023 10:43:28 +0100 Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] setup: recognize bare repositories with packed-refs To: Junio C Hamano , Glen Choo , Josh Steadmon Cc: git@vger.kernel.org References: <20231117202513.20604-1-adamm@zombino.com> <20231117203253.21143-1-adamm@zombino.com> Content-Language: en-US From: Adam Majer In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/20/23 00:24, Junio C Hamano wrote: > Adam Majer writes: > >> In a garbage collected bare git repository, the refs/ subdirectory is >> empty. In use-cases when such a repository is directly added into >> another repository, it no longer is detected as valid. > > Josh & Glen [*], isn't this a layout that we explicitly discourage and > eventually plan to forbid anyway? > > *1* who worked on e35f202b (setup: trace bare repository setups, 2023-05-01) This is fair enough. Completely removing embedded git repos would cause some pain in test suites as it was discussed in the thread for that commit[1]. Gitea (for example) has a few dozen embedded bare repositories for tests. In either case, running `git gc` on a bare repository makes it no longer detectable as a git repository after checkout, GIT_DIR or not. This seems to be unintentional and not linked to the other discussion. - Adam