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

Re: [wishlist] submodule.update config

From
Stefan Beller <sbeller@google.com>
Date
Dec 10, 2018, 20:40 UTC
Message-ID
<CAGZ79kY+F776YfNBrx3wk3ffv4sqqabM5iJxbQDiPE6xoio69w@mail.gmail.com>
In-Reply-To
<20181208154539.GH4633@hopa.kiewit.dartmouth.edu>
On Sat, Dec 8, 2018 at 7:45 AM Yaroslav Halchenko <yoh@onerussian.com> wrote:
Show 8 quoted lines
> I wondered, if you think it would be sensible to also add of
> submodule.update which would be considered before submodule.SUBMODULE.update
> variable possibly defined per submodule.  That would be more inline with desire
> to use any of the --merge, --rebase (and hopefully soon --reset-hard)
> strategies specified as an option for submodule update, where no per-submodule
> handling  is happening.
>
> Thanks in advance for the consideration!

So you are proposing a variable like submodule.update without the .<name>. that would apply to any submodule?

The precedence in descending order of these configs that modify the behavior of "git submodule update" would be:

* the command line flag (--merge/--rebase/--checkout)
* submodule specific instructions (submodule.<name>.update)
* generic submodule config (the new submodule.update)
* default as --checkout

I first hesitated in thinking this would be a good addition, as there is no plumbing command for submodules, to easily modify submodules irrespective of the user config. But that is out already with the submodule specific update configs. So I think it may be a good addition.

I wonder if we'd be better off to re-invent the UX instead of hiding your intentions in a config setting for a command that is already long to type. What about

  git submodule merge
  git submodule rebase
  git submodule checkout
  git submodule reset (--hard)
as aliases for
  git submodule update (...)
Previous: Yaroslav HalchenkoNext: Yaroslav Halchenko
Message 2 of 7 in “[wishlist] submodule.update config”
  1. Yaroslav HalchenkoDec 8, 2018
  2. Stefan BellerDec 10, 2018
  3. Yaroslav HalchenkoDec 10, 2018
  4. Re: [wishlist] submodule.update configStefan Beller, Dec 11, 2018
  5. Yaroslav O HalchenkoDec 11, 2018
  6. Stefan BellerDec 12, 2018
  7. Yaroslav HalchenkoDec 13, 2018

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.