From: Junio C Hamano <gitster@pobox.com>
To: Craig Silverstein <csilvers.mail@gmail.com>
Cc: git@vger.kernel.org, jrnieder@gmail.com, pclouds@gmail.com,
Jens Lehmann <Jens.Lehmann@web.de>
Subject: Re: [PATCH] git-new-workdir: support submodules
Date: Tue, 23 Dec 2014 11:08:48 -0800 [thread overview]
Message-ID: <xmqqzjae18vz.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1419360673.196271.13944.nullmailer@meta> (Craig Silverstein's message of "Mon, 22 Dec 2014 18:10:27 -0800")
Craig Silverstein <csilvers.mail@gmail.com> writes:
> The basic problem with submodules, from git-new-workdir's point of
> view, is that instead of having a .git directory, they have a .git
> file with contents `gitdir: <some other path>`. This is a problem
> because the submodule's config file has an entry like `worktree =
> ../../../khan-exercises` which is relative to "<some other path>"
> rather than to "submodule_dir/.git".
>
> As a result, if we want the new workdir to work properly, it needs to
> keep the same directory structure as the original repository: it
> should also contain a .git file with a 'gitdir', and the actual .git
> contents should be in the place mentioned therein.
Hmmmm, does that mean that the submodule S in the original
repository O's working tree and its checkout in the secondary
working tree W created from O using git-new-workdir share the same
repository location? More specifically:
O/.git/ - original repository
O/.git/index - worktree state in O
O/S - submodule S's checkout in O
O/S/.git - a gitfile pointing to O/.git/modules/S
O/.git/modules/S - submodule S's repository contents
O/.git/modules/S/config - submodule S's config
W/.git/ - secondary working tree
W/.git/config - symlink to O/.git/config
W/.git/index - worktree state in W (independent of O)
W/S - submodule S's checkout in W (independent of O)
W/S/.git - a gitfile pointing to O/.git/modules/S
Doesn't a submodule checkout keep some state tied to the working
tree in its repository configuration file? Wouldn't this change
introduce problems by sharing O/.git/modules/S/config between the
two checkouts?
next prev parent reply other threads:[~2014-12-23 19:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-23 2:10 [PATCH] git-new-workdir: support submodules Craig Silverstein
2014-12-23 19:08 ` Junio C Hamano [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-12-23 21:51 Craig Silverstein
2015-01-24 0:48 ` Craig Silverstein
2015-01-24 1:37 ` Junio C Hamano
2015-01-25 1:47 ` Craig Silverstein
2015-01-26 4:05 ` Junio C Hamano
2015-01-26 4:57 ` Craig Silverstein
2015-01-26 5:39 ` Junio C Hamano
2015-01-27 17:35 ` Jens Lehmann
2015-01-28 10:50 ` Duy Nguyen
2015-01-28 10:53 ` Duy Nguyen
2015-01-28 20:18 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqzjae18vz.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=Jens.Lehmann@web.de \
--cc=csilvers.mail@gmail.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.