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

Re: [PATCH] Re: [wishlist] submodule.update config

From
Yaroslav O Halchenko <yoh@onerussian.com>
Date
Dec 11, 2018, 05:10 UTC
Message-ID
<20181211051032.GQ4633@hopa.kiewit.dartmouth.edu>
In-Reply-To
<20181211000859.130266-1-sbeller@google.com>
On Mon, 10 Dec 2018, Stefan Beller wrote:
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
> > > So you are proposing a variable like submodule.update
> > [...]
> > Glad to hear that. Not sure though I would know where to stick my
> > nose to figure out what to change. ;-)
Show 5 quoted lines
> The update_module is computed via the submodule--helpers
> update-module-mode command, which is a small wrapper
> around determine_submodule_update_strategy()
> which you already touched in the other patch that makes
> --reset-hard another mode.
> This contains code and tests, but we'd need some docs as well.
> I am not sure about this patch as it allows for easier experimentation
> with submodules (e.g. "git config submodule.update '!git reset --hard'"
> sounds like what you're trying to get)

;-) it was indeed one of the original approaches I considered instead of having "update --reset-hard"...

> and using them, but as discussed
> below this might be too much convenience already and we'd rather want to
> have it properly integrated into the real commands.

indeed, having "update --reset-hard" provides necessary to me convenience for my use cases. Motivation behind submodule.update was primarily to allow for heterogeneous (but still simple to define) strategies, where for some subproject I could just define submodule.update to be "reset-hard" (I do not expect my local commits matter) and in the others -- "merge" (I carry my changes on top).

But again, I must confess, that either I forgot or just do not see a clear use-case/demand for submodule.update config myself any longer, besides providing a potentially useful default over submodule.MODULE.update config.

Show 5 quoted lines
> > Well, not sure... In the long run, if UX is to be tuned up, I wonder if
> > it would be more worthwhile to look toward making all those git commands
> > (git merge, git checkout, git rebase, ..., git revert, git cherry-pick)
> > support --recurse-submodules with a consistent with the non-recursive
> > operation by default behavior
> That is the end goal, very much.
> > (e.g.  not introducing detached HEADs or
> > controlling that via a set of additional options where needed).
> As with the discussion of the submodule.repoLike option (the patch I
> referenced in the other discussion), this is tricky to get the right
> behavior, so it takes some more time to do.
> Also what is right for a "git merge --recursive" might be totally different
> from a "git submodule update --merge" as the former is not centered around
> submodules but merging, such that a sensible default would be expected,
> whereas the "submodule update" is allowed to have a rough edge.

Probably I need to try "submodules update --merge" to see what is that rough edge which makes it different from the potential "merge --recurse-submodules", or is it easy to describe? ;-)

I wonder if may be instead of pestering you about this config one, I should ask about pointers on how to accomplish "revert --recurse-submodules" or where to poke to make it possible to clone recursively from http://datasets.datalad.org/ where we do not place submodules all under the very top /.git/modules ;-)

-- 
Yaroslav O. Halchenko
Center for Open Neuroscience     http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        
Previous: Stefan BellerNext: Stefan Beller
Message 5 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.