Re: [PATCH 1/2] add: warn when adding an embedded repository
- From
Jeff King <peff@peff.net>
- Date
- Jun 14, 2017, 06:38 UTC
- Message-ID
- <20170614063849.kkdzxp54r25l2wk6@sigill.intra.peff.net>
- In-Reply-To
- <xmqqshj37qqo.fsf@gitster.mtv.corp.google.com>
On Tue, Jun 13, 2017 at 10:16:15AM -0700, Junio C Hamano wrote:
Show 16 quoted lines
> Jeff King <peff@peff.net> writes: > > > I also waffled on whether we should ask the submodule code > > whether it knows about a particular path. Technically: > > > > git config submodule.foo.path foo > > git config submodule.foo.url git://... > > git add foo > > > > is legal, but would still warn with this patch. > > Did you mean "git config -f .gitmodules" for the first two? If so, > I think I agree that (1) it should be legal and (2) we should be > able to add the check on top of this patch. > > Or do you really mean the case in which these are in .git/config?
I did mean .git/config, but I think it was because I was mostly confused about what was possible. In either case I think what we'd want is to ask "could this be used as an active submodule". And leave it to the submodule code to decide whatever mechanisms are legal.
-Peff