From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: project.el: git submodules? Date: Tue, 12 May 2020 17:04:31 -0400 Message-ID: References: <875zd1ni5i.fsf@md5i.com> <55769244-c84c-dff0-4427-9ff688f81af5@yandex.ru> <87v9l0nar5.fsf@md5i.com> <95a8c285-125f-afda-b1bc-d1c0452e5c31@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="90400"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Michael Welsh Duggan , Gary Oberbrunner , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 12 23:05:41 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYc5s-000NQJ-SJ for ged-emacs-devel@m.gmane-mx.org; Tue, 12 May 2020 23:05:40 +0200 Original-Received: from localhost ([::1]:43390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYc5r-0000b1-Sv for ged-emacs-devel@m.gmane-mx.org; Tue, 12 May 2020 17:05:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYc4w-0006xt-B6 for emacs-devel@gnu.org; Tue, 12 May 2020 17:04:43 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:37556) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYc4u-00017s-Ry for emacs-devel@gnu.org; Tue, 12 May 2020 17:04:41 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 6482181196; Tue, 12 May 2020 17:04:39 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 88A5681193; Tue, 12 May 2020 17:04:33 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1589317473; bh=AkiY7m+jJHRQVIU1CTNu2zp3SeHAJk+IQWovEjoKVVI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=k2d72n+afYSZJMtKr8FP6RsEUWyTQXZqd0Ie9VCgP4BXDTN2CNEI+RqTHU9nqYTEW 0lKvfeCVI5gKQBiHYVTyLyvZ+jlsBuZoMubHzwOCsUw5nlNJMjXGKMuLpLpXK+6b7t d9eekP3ncoHS2kOONdP2rG+AXvndqpHnWb9zPEAOAMW/tbh8R3HrwkL6Tt/6hveuph I6kOgUHKN2K0VyeWx1I/OfCHLWdc4PwZm5GjiKO2uKw8CSnBjB5nYUFZBQNAGsHsOZ XwLZV8DCnRNPWUXrpF6c2JUolAt7E76vDZn1JTuUH+krArpPQpQvGRTxBK2nLH/JLn 563PVjFAkicMg== Original-Received: from alfajor (unknown [216.154.3.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E713A12068D; Tue, 12 May 2020 17:04:32 -0400 (EDT) In-Reply-To: <95a8c285-125f-afda-b1bc-d1c0452e5c31@yandex.ru> (Dmitry Gutov's message of "Tue, 12 May 2020 23:53:19 +0300") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/12 13:54:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:250047 Archived-At: > Perhaps you could suggest an additional test to determine whether > a directory is a submodule, then? Indeed, technically, a submodule is implemented in the same way as a worktree. And in `elpa.git`, we use worktrees to implement our own notion of submodule. I get the impression that distinguishing the two amounts to guessing the intent behind a particular directory layout, so there will never be a 100% correct answer. But I guess a first approximation is to check "is there another .git somewhere further up the directory tree and if so, does it use the same repository as the current .git does?". Stefan