Re: [RFC/PATCH] clone: introduce clone.submoduleGitDir to relocate $GITDIR
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Apr 17, 2013, 10:59 UTC
- Message-ID
- <CACsJy8C9mrJzmg4FjqBMAZis7WQUpyhNH7TMTLbebWQE124YMg@mail.gmail.com>
- In-Reply-To
- <CALkWK0kw69rMveDXpGEvV=fGxiQ7JoT_JE9ZU5cor0xD=BUbFQ@mail.gmail.com>
On Wed, Apr 17, 2013 at 8:53 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
Show 13 quoted lines
> Duy Nguyen wrote: >> What if I clone a repo then realize it was a mistake and remove it? >> With current clone, a "rm -rf" would do. With this, I'll need to >> figure out which subdir in the top .git contains the repo I want to >> remove. I'm not sure how "git submodule" handles this case though >> (i.e. total submodule ignorant speaking..) > > Currently, submodules relocate the GITDIR of submodules to > .git/modules. So, my proposed patch doesn't make the situation any > worse. In fact, it improves the situation because you're guaranteed > that all your GITDIRs will be in ~/bare (or whatever your > core.submoduleGitDir is), as opposed to a complex path in .git/modules > of your containing superproject.
No, submodule code does not change "git clone". If I'm not mistaken, submodule will not kick in until you type "git submodule something". If I turn clone.submoduleGitDir on, how can I undo my mistake in a user friendly way? -- Duy