git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH] Disallow commands from within unpopulated submodules.

From
Jeff King <peff@peff.net>
Date
Jan 20, 2017, 20:00 UTC
Message-ID
<20170120200041.hefg44stddqe344z@sigill.intra.peff.net>
In-Reply-To
<CAGZ79kYKY=hDVjUx7AkeWZ=3V8Fy2hqQMFPZcoxT4NvXTFgG=Q@mail.gmail.com>
On Fri, Jan 20, 2017 at 11:53:01AM -0800, Stefan Beller wrote:
Show 14 quoted lines
> > One alternative would be to make the check cheaper. Could we reliably
> > tell from the submodule.foo.* block in the config that path "foo" is a
> > submodule? I think that would work after "submodule init" but not right
> > after "git clone". So the index really is the source of truth there.
> 
> Well we can check if there is a .gitmodules file that has a
> submodule.*.path equal to the last part of $CWD, no need to look
> at the git config.
> 
> And that would also work right after git clone (in an
> unpopulated/uninitialized submodule as I call it).
> 
> And in my current understanding of submodules the check in
> .gitmodules ought to be enough, too.

Yeah, that probably makes sense. You can have a gitlink without a .gitmodules file, but I don't quite know what that would mean in terms of submodules (I guess it's not a submodule but "something else").

-Peff
Previous: Stefan BellerNext: Stefan Beller
Message 6 of 13 in “Disallow commands from within unpopulated submodules.”
  1. Disallow commands from within unpopulated submodules.Stefan Beller, Jan 19, 2017
  2. Jeff KingJan 20, 2017
  3. Stefan BellerJan 20, 2017
  4. Jeff KingJan 20, 2017
  5. Stefan BellerJan 20, 2017
  6. Jeff KingJan 20, 2017
  7. Stefan BellerJan 20, 2017
  8. Junio C HamanoJan 20, 2017
  9. Jeff KingJan 20, 2017
  10. Junio C HamanoJan 20, 2017
  11. Jeff KingJan 20, 2017
  12. Stefan BellerJan 20, 2017
  13. Duy NguyenJan 21, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.