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

Re: url.<base>.insteadOf vs. submodules

From
Jeff King <peff@peff.net>
Date
Feb 22, 2017, 18:57 UTC
Message-ID
<20170222185711.2kpzeypptg6deytc@sigill.intra.peff.net>
In-Reply-To
<xmqqh93mcelv.fsf@gitster.mtv.corp.google.com>
On Wed, Feb 22, 2017 at 09:36:12AM -0800, Junio C Hamano wrote:
Show 19 quoted lines
> >> My gut feeling is that we should do the selective/filtered include
> >> Peff mentioned when a repository is known to be used as a submodule
> >> of somebody else.
> >
> > Does the management of these submodue-related config values
> > become easier if, instead of placing them in .config, we
> > place them in a git/.context file?
> 
> Do you mean that Git users that use submodules adopt a convention
> where a separate file in $GIT_DIR of the toplevel superproject holds
> pieces of configuration that are meant to be shared between the
> superproject and across all its submodules, and the $GIT_DIR/config
> file in submodules and the superproject all include that shared one
> via include.path mechanism?
> 
> That may allow us to do without being responsible for sifting of
> configuration variables into safe and unsafe bins.
> 
> I dunno.

Hmm. I certainly like that we punt on having to decide on the "should this be shared with submodules" decision. That makes the end result more flexible, and we don't have to get into a never-ending stream of "whitelist this config option" patches.

My only concern is that it's not as discoverable. In the situation that kicked off this thread, somebody put url.X.insteadOf into their super-project .git/config, expecting it to work in the submodules. That _still_ wouldn't work with this proposal. They'd have to:

  1. Put it in .git/context (or whatever we call it)
  2. Maybe add include.path=context in .git/config if they want the
     config shared with the super-project (or this could be automatic?)

I guess it gives _a_ solution, which is more than we have now, but it doesn't feel very ergonomic.

-Peff
Previous: Junio C HamanoNext: Stefan Beller
Message 16 of 19 in “url.<base>.insteadOf vs. submodules”
  1. ToolforgerFeb 19, 2017
  2. Jeff KingFeb 20, 2017
  3. ToolforgerFeb 20, 2017
  4. Jeff KingFeb 20, 2017
  5. ToolforgerFeb 21, 2017
  6. Jeff KingFeb 21, 2017
  7. Stefan BellerFeb 21, 2017
  8. Jeff KingFeb 21, 2017
  9. Stefan BellerFeb 21, 2017
  10. Junio C HamanoFeb 21, 2017
  11. Junio C HamanoFeb 21, 2017
  12. Stefan BellerFeb 22, 2017
  13. Junio C HamanoFeb 22, 2017
  14. Jon LoeligerFeb 22, 2017
  15. Junio C HamanoFeb 22, 2017
  16. Jeff KingFeb 22, 2017
  17. Stefan BellerFeb 22, 2017
  18. Jeff KingFeb 21, 2017
  19. Stefan BellerFeb 22, 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.