From: "Neal Kreitzinger" <neal@rsss.com>
To: git@vger.kernel.org
Subject: nested git repos (not submodules)
Date: Thu, 9 Feb 2012 20:34:42 -0600 [thread overview]
Message-ID: <jh1vo3$7af$1@dough.gmane.org> (raw)
In the worktree of a particular git repo, the user has made a subdir
(worktree/subdir) of the worktree (worktree/.git) its own repo
(worktree/subdir/.git). Is there a danger of worktree/.git and
worktree/subdir/.git crossing wires? Are literally nested git repos (whose
worktrees are in turn tracked as subdirs by upper-level git repo(s)) a
supported/valid model in regards to git.git (NOT git-addons)?
Symptomatically, I have observed the following so far:
(1) worktree/.git is "ignoring" (or unaware of) worktree/subdir/.git because
it is treating subdir/ as if subdir/.git wasn't there and is not listing
subdir/.git as untracked. I'm not sure if this is an unintended side-effect
of git ignoring .git(s) automatically, or if having subdir/.git's (w/out
having them defined as submodules) is an expected
(reasonable/sane/recommended) model for git.git users.
(2) running git commands with pwd=worktree/subdir/ acts upon
worktree/subdir/.git (subdir/ is regarded as the toplevel of subdir/.git as
opposed to a subdir of worktree/.git) and is seemingly oblivious to
worktree.git.
I suspect submodules is the "correct" way to implement the effect of nested
git repos. That being said, this literal nested git repo is a temporary
band-aid and I don't expect it to be propogated, but I do have to deal
(react) with it in the meantime. I'm thinking I can manage that and deal
with annoyances as they arise, unless there are any unseen landmines I'm not
aware of. Please advise.
(I also wouldn't be surprised to hear that this is exactly how submodules
really first started in theory or practice.)
Thanks in advance for any feedback.
v/r,
neal
next reply other threads:[~2012-02-10 2:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-10 2:34 Neal Kreitzinger [this message]
2012-02-10 3:47 ` nested git repos (not submodules) Andrew Ardill
2012-02-10 22:07 ` Neal Kreitzinger
2012-02-10 4:16 ` Junio C Hamano
2012-02-10 22:30 ` Neal Kreitzinger
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='jh1vo3$7af$1@dough.gmane.org' \
--to=neal@rsss.com \
--cc=git@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).