From: Junio C Hamano <gitster@pobox.com>
To: Matheus Tavares <matheus.bernardino@usp.br>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
Kalyan Sriram <kalyan@coderkalyan.com>, git <git@vger.kernel.org>
Subject: Re: Git submodule remove
Date: Thu, 21 Oct 2021 16:35:23 -0700 [thread overview]
Message-ID: <xmqqee8egddw.fsf@gitster.g> (raw)
In-Reply-To: <CAHd-oW5PfygyNsRWGg4_W2pxR_HbePvguKRf-bK9RtY3cuAX9g@mail.gmail.com> (Matheus Tavares's message of "Thu, 21 Oct 2021 20:25:03 -0300")
Matheus Tavares <matheus.bernardino@usp.br> writes:
> On Thu, Oct 21, 2021 at 7:47 PM Junio C Hamano <gitster@pobox.com> wrote:
>>
>> "brian m. carlson" <sandals@crustytoothpaste.net> writes:
>>
>> > On 2021-10-21 at 17:25:38, Kalyan Sriram wrote:
>> >> Hello,
>> >>
>> >> I was curious why git-submodule does not have an `rm` command. Currently
>> >> I have to manually delete it from .gitmodules, .git/config,
>> >> .git/modules/, etc. See [0].
>> >>
> [...]
>> I'd imagine that the happy-case implementation should be fairly
>> straight-forward. You would:
>>
>> - ensure that the submodule is "absorbed" already;
>>
>> - run "git rm -f" the submodule to remove the gitlink from the index
>> and remove the directory from the working tree; and
>>
>> - remove the .gitmodules entry for the submodule.
>
> I think "git rm <submodule>" already does these three steps, doesn't it?
Wow, that is a unnerving layering violation, but I suspect it is too
late to fix it. So perhaps "git submodule rm" would just become a
synonym for "git rm"?
Thanks.
next prev parent reply other threads:[~2021-10-21 23:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-21 17:25 Git submodule remove Kalyan Sriram
2021-10-21 21:36 ` brian m. carlson
2021-10-21 22:47 ` Junio C Hamano
2021-10-21 23:25 ` Matheus Tavares
2021-10-21 23:35 ` Junio C Hamano [this message]
2021-10-22 3:32 ` Kalyan Sriram
2021-10-22 22:02 ` Junio C Hamano
2021-10-24 20:33 ` Kalyan Sriram
2021-10-24 20:46 ` Junio C Hamano
2021-10-22 12:12 ` Ævar Arnfjörð Bjarmason
2021-10-22 21:32 ` Junio C Hamano
2021-10-22 13:47 ` Randall S. Becker
2021-10-22 17:52 ` Kalyan Sriram
2021-10-22 20:45 ` Randall S. Becker
2021-10-22 21:17 ` 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=xmqqee8egddw.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=kalyan@coderkalyan.com \
--cc=matheus.bernardino@usp.br \
--cc=sandals@crustytoothpaste.net \
/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.