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

Re: [PATCH] Make 'submodule update' honor the 'update' setting in .gitmodules.

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 7, 2009, 21:54 UTC
Message-ID
<7veirns30y.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1249530977-17501-1-git-send-email-foldr@codedgers.com>
Mikhail Glushenkov <foldr@codedgers.com> writes:
> Make the 'submodule update' command honor the 'submodule.$path.update' setting
> in .gitmodules unless this setting is overridden in '.git/config' or with
> --rebase/--merge options.

I haven't been involved in recent updates to "git submodule", but the change in this patch feels somewhat wrong.

The contents of in-tree .gitmodules are meant to be consulted to only prime the settings in .git/config, and after that they are never used without user's explicit concent (e.g. "sync"). At least that is the way I understand how the current "git submodule" command is designed.

This change actively breaks the pattern. It makes sense to set up values for "submodule.*.update" when the defaults suggested by the project are copied out of .gitmodules to prime .git/config upon "submodule init", but not at runtime in "update" command like this.

I am puzzled.  What problem are you trying to solve?

"submodule init" seems to already copy "update" setting from .gitmodules to .git/config. At least, it seems to have a code to try to do so.

Perhaps you would want to (1) add the "submodule.*.update" to the set of configurations to be copied upon "sync", not just URL? and (2) add a way to allow users to inspect how values in .git/config and .gitmodules are different, and update .git/config with selected values, possibly in an interactive manner?

Previous: Mikhail Glushenkov
Message 2 of 2 in “Make 'submodule update' honor the 'update' setting in .gitmodules.”
  1. Make 'submodule update' honor the 'update' setting in .gitmodules.Mikhail Glushenkov, Aug 6, 2009
  2. Junio C HamanoAug 7, 2009

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.