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

Re: issue with git submodules and a clone.defaultRemoteName different than origin?

From
Patrick Steinhardt <ps@pks.im>
Date
Jun 7, 2025, 05:43 UTC
Message-ID
<aEPRiEdJ8c0X4HY5@pks.im>
In-Reply-To
<xmqq8qm41m62.fsf@gitster.g>
On Fri, Jun 06, 2025 at 04:32:21PM -0700, Junio C Hamano wrote:
Show 17 quoted lines
> Jacob Keller <jacob.e.keller@intel.com> writes:
> 
> > It looks like those end up in the "read_remotes_file" and
> > "read_branches_file" functions which are deprecated, and planned to be
> > removed in 3.0...
> >
> > Would patches to modify those to take a repository pointer in order to
> > allow callers of read_config() to work properly with a submodule
> > repository be acceptable?
> 
> The recent trend has been that it generally is very much welcomed to
> fix such a code path that takes "repo" at an entry point but ends up
> deep in its callchain to ignore it and use the_repository instead,
> even without a potential use case to benefit from such a change.
> 
> You have a concrete use case, so I would suspect it is even better
> than "acceptable".  Patrick, what do you think?

I definitely agree, yes. It is a long road to get rid of `the_repository`. Taking many small steps on this road that have a proper motivation is way easier than doing large steps that get rid of the variable for the sake of getting rid of it.

Patrick
Previous: Junio C Hamano
Message 6 of 6 in “issue with git submodules and a clone.defaultRemoteName different than origin?”
  1. Jacob KellerJun 3, 2025
  2. Junio C HamanoJun 3, 2025
  3. Jacob KellerJun 4, 2025
  4. Jacob KellerJun 6, 2025
  5. Junio C HamanoJun 6, 2025
  6. Patrick SteinhardtJun 7, 2025

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.