From: Tim Harper <timcharper@gmail.com>
To: Tim Henigan <tim.henigan@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git submodule remove?
Date: Fri, 10 Jul 2009 23:27:25 -0600 [thread overview]
Message-ID: <e1a5e9a00907102227y4ea2b1f6y2e9882afd726a4eb@mail.gmail.com> (raw)
In-Reply-To: <32c343770907081241h5925545ah1cb551b31e45ddc0@mail.gmail.com>
On Wed, Jul 8, 2009 at 1:41 PM, Tim Henigan<tim.henigan@gmail.com> wrote:
> Hello,
>
> I recently encountered a situation where a user wanted to remove a submodule
> from a repository. Searching the mail archive, I found this thread
> [1], but it does
> not appear that it was ever followed up.
>
> The Git Submodule Tutorial [2] has instructions for removing submodules, but it
> seems natural to teach git how to "submodule rm".
>
> This change would require git-submodule.sh to:
> 1. Modify the .gitmodules file (remove the entry for the submodule).
> 2. Modify the .git/config file (remove the entry for the submodule).
> 3. Delete the newly untracked files.
>
Submodules are tracked by the tree. You'll need to 'rm -rf' the
submodule, and then 'git rm' the folder to remove it.
> Another option to consider would be a "submodule rm --cached" option which would
> keep the newly untracked files. However, with this option, I believe
> it should still
> descend into the submodule directory to remove the leftover submodule
> ".git" folder.
>
> Is there another way of doing this? If not, does this sound like a
> reasonable change?
I can think of the only opposition being how blatantly dangerous it
would be. You're creating a command that will nuke the whole
repository, along with any unpushed changes. There's potential there
for someone to seriously injure themselves without realizing it.
There's also the issue of once you delete a submodule... now what?
Git won't automatically remove them from other repositories when the
change gets pulled. The folder will show up as untracked. So far the
current paradigm with git submodules is git is very "hands off" and
leaves as much as possible to you. I think we would have to see a
change in thought consistently around how to approach submodules
before git implements anything of this sort.
next prev parent reply other threads:[~2009-07-11 5:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-08 19:41 git submodule remove? Tim Henigan
2009-07-08 21:54 ` Raman Gupta
2009-07-11 5:27 ` Tim Harper [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-03-31 18:58 Asheesh Laroia
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=e1a5e9a00907102227y4ea2b1f6y2e9882afd726a4eb@mail.gmail.com \
--to=timcharper@gmail.com \
--cc=git@vger.kernel.org \
--cc=tim.henigan@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 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).