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

Re: [PATCH v3] submodule: teach set-url subcommand

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 30, 2019, 05:54 UTC
Message-ID
<xmqqtv7q3hhp.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<f5f44812af2b43fe3f7ea837f8b07c4747eedcc0.1572368447.git.liu.denton@gmail.com>
Denton Liu <liu.denton@gmail.com> writes:
> Currently, in the event that a submodule's upstream URL changes, users
> have to manually alter the URL in the .gitmodules file then run
> `git submodule sync`. Let's make that process easier.

Right now, submodule.<name>.url might be the only thing that gets synched down to .git/config of the submodule; we may not learn any more things that needs "edit in .gitmodules and then run sync". Can we sately say that "sync" is now obsolete and what it has been used for can now be done with "set-url"? In other words, does "set-url" makes "sync" unnecessary and deprecated?

Or is it expected that we would learn more things end users can edit in .gitmodules and run sync to propagate necessary pieces of information down? If so, do we want to add an extra command like set-url for each of these new things, or do we tell users "if you are editing url, use set-url, otherwise edit .gitmodules and run sync"? If the former, that would make the set of subcommands quite noisy, and if the latter, the users need to learn two things, i.e. it is not making it easier but harder to learn the system.

There is nothing _wrong_ to introduce the new subcommand per-se, but given that the URL should not change that often, and due to above concerns, I am not sure if I want to back this change.

Previous: Denton LiuNext: Denton Liu
Message 5 of 7 in “submodule: teach set-url subcommand”
  1. submodule: teach set-url subcommandDenton Liu, Sep 17, 2019
  2. submodule: teach set-url subcommandDenton Liu, Oct 29, 2019
  3. Danh DoanOct 29, 2019
  4. submodule: teach set-url subcommandDenton Liu, Oct 29, 2019
  5. Junio C HamanoOct 30, 2019
  6. Denton LiuOct 30, 2019
  7. Junio C HamanoNov 2, 2019

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.