From: Adam Stankiewicz <sheerun@sher.pl>
To: git@vger.kernel.org
Subject: Git submodule repository locatio
Date: Wed, 24 Apr 2013 16:44:29 +0200 [thread overview]
Message-ID: <5177EFCD.1020300@sher.pl> (raw)
Currently each submodule contains single .git file (instead of directory)
with only link to project's base repository, for example "gitdir:
../../.git/modules/lib/neobundle.vim".
In git base repository we find .git/modules directory that contains bare
repositories of all submodules, for example .git/modules/lib/neobundle.vim
contains bare repository of neobundle submodule.
My proposal is to move default bare repository location from .git/modules
to .git directory inside submodule, like every normal git repo do.
These are my arguments:
1. Why git submodule needs to know in which project it is embedded in? Or
even that it's generally submodule? When cd to submodule, it behaves like
normal repository. Only repository needs to know about its submodules.
2. You can't move submodule outside git repository and use it as normal git
repo. You have to copy bare repo from .git/modules dir.
3. It's not enough to delete submodule from workingdir to "refresh" it
later. You have to go to .git/modules directory and delete appropriate
folder.
What about performance on checkouts?
In systems supporting symlinks, the .git directory in submodule can be a
symlink to the .git/modules subdirectory. In systems that do not support
them, you can use mv-like command, that is very fast. Just move .git
directory of submodule to .git/modules subdirectory, until you you need it
(when you check out commit with "Subproject commit 55d868e(...) object").
I propose introducing this change in next major version of git, as it can
break some scripts that depend on git submodule repository location.
Please consider this "feature request" seriously, most people I know think
git submodules suck, and described issue is IMHO one of the reasons why.
Sincerely,
Adam Stankiewicz (@sheerun)
next reply other threads:[~2013-04-24 14:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 14:44 Adam Stankiewicz [this message]
2013-04-24 15:11 ` Git submodule repository locatio Fredrik Gustafsson
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=5177EFCD.1020300@sher.pl \
--to=sheerun@sher.pl \
--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).