From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC] git submodule purge
Date: Tue, 17 Mar 2015 09:18:26 +0100 [thread overview]
Message-ID: <20150317081826.GB354@pks-pc> (raw)
In-Reply-To: <xmqqmw3drl7s.fsf@gitster.dls.corp.google.com>
[-- Attachment #1: Type: text/plain, Size: 1453 bytes --]
On Mon, Mar 16, 2015 at 08:55:03AM -0700, Junio C Hamano wrote:
> Patrick Steinhardt <ps@pks.im> writes:
>
> > I think there should be a command that is able to remove those
> > dangling repositories if the following conditions are met:
> >
> > - the submodule should not be initialized
> >
> > - the submodule should not have an entry in .gitmodules in the
> > currently checked out revision
> >
> > - the submodule should not contain any commits that are not
> > upstream
> >
> > - the submodule should not contain other submodules that do not
> > meet those conditions
>
> I do not have a strong opinion on whether it is a good idea to make
> it possible to remove the .git/modules/*, but should it be a
> separate subcommand, or should it be an option to the 'deinit'
> subcommand?
See my response to Jonathan.
> Also, how would you apply the safety to a repository without
> "upstream", i.e. the authoritative copy?
Is it even possible to create a new submodule without any
upstream repository? At least `git submodule init` does not work
without a corresponding entry in .gitmodules which the user would
have needed to create himself manually. In this case one _could_
assume that the user knows what he is doing and expect him not to
call `submodule purge` (or whatever the command will be called)
on the authoritative copy. Other than that I've got no idea how
to assure safety.
Regards
Patrick
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-03-17 8:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-16 13:44 [RFC] git submodule purge Patrick Steinhardt
2015-03-16 15:55 ` Junio C Hamano
2015-03-17 8:18 ` Patrick Steinhardt [this message]
2015-03-17 8:25 ` Fredrik Gustafsson
2015-03-16 20:03 ` Jonathan Nieder
2015-03-17 7:56 ` Patrick Steinhardt
2015-03-23 21:32 ` Jens Lehmann
2015-03-25 9:06 ` Patrick Steinhardt
2015-03-25 19:47 ` Jens Lehmann
2015-03-26 13:30 ` Patrick Steinhardt
2015-03-26 21:48 ` Jens Lehmann
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=20150317081826.GB354@pks-pc \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).