From mboxrd@z Thu Jan 1 00:00:00 1970 From: Max Kirillov Subject: Re: [PATCH/RFC v2] Squashed changes for multiple worktrees vs. submodules Date: Mon, 1 Dec 2014 16:47:31 +0200 Message-ID: <20141201144731.GA9128@wheezy.local> References: <1417390076-2953-1-git-send-email-max@max630.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jens Lehmann , Junio C Hamano , Git Mailing List To: Duy Nguyen X-From: git-owner@vger.kernel.org Mon Dec 01 15:47:49 2014 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 1XvSGO-000384-Ob for gcvg-git-2@plane.gmane.org; Mon, 01 Dec 2014 15:47:45 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932071AbaLAOrl (ORCPT ); Mon, 1 Dec 2014 09:47:41 -0500 Received: from p3plsmtpa07-02.prod.phx3.secureserver.net ([173.201.192.231]:33889 "EHLO p3plsmtpa07-02.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932067AbaLAOrk (ORCPT ); Mon, 1 Dec 2014 09:47:40 -0500 Received: from wheezy.local ([82.181.81.240]) by p3plsmtpa07-02.prod.phx3.secureserver.net with id NEnV1p00F5B68XE01Enbo5; Mon, 01 Dec 2014 07:47:40 -0700 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Mon, Dec 01, 2014 at 05:43:16PM +0700, Duy Nguyen wrote: > On Mon, Dec 1, 2014 at 6:27 AM, Max Kirillov wrote: >> But, while hacking the submodule init I became more >> convinced that the modules directory should be common and >> submodules in checkout should be a checkouts of the >> submodule. Because this is looks like concept of >> submodules, that they are unique for the lifetime of >> repository, even if they do not exist in all revisions. >> And if anybody want to use fully independent checkout >> they can be always checked out manually. Actually, after >> a submodule is initialized and have a proper gitlink, it >> can be updated and inquired regardless of where it points >> to. > > Just throw something in for discussion. What about keeping > $GIT_DIR/modules like it is now (i.e. not shared) and add > $GIT_DIR/shared-modules, which is the same for all > checkouts? That would keep current submodule code happy > (no name collision or anything). New submodule code can > start using $GIT_DIR/shared-modules while still keeping an > eye on $GIT_DIR/modules for old setups. I think it would be too complicated. To make fancy think user can always manually initialize a repository or a checkout. And all sumbodule functionality except adding/removing/(de)initialization should work with any repository or gitlink, regardless of where it points to.