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

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

From
MGMikhail Glushenkov <foldr@codedgers.com>
Date
Aug 6, 2009, 03:56 UTC
Message-ID
<1249530977-17501-1-git-send-email-foldr@codedgers.com>

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.

Signed-off-by: Mikhail Glushenkov <foldr@codedgers.com>
---
 git-submodule.sh |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index ebed711..636023a 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -372,6 +372,15 @@ cmd_update()
 		name=$(module_name "$path") || exit
 		url=$(git config submodule."$name".url)
 		update_module=$(git config submodule."$name".update)
+
+		if test -z "$update_module"
+		then
+		    update_module="$(git config -f .gitmodules submodule."$name".update)"
+		    test -z "$update_module" ||
+		    git config submodule."$name".update "$update_module" ||
+		    die "Failed to register update mode for submodule path '$path'"
+		fi
+
 		if test -z "$url"
 		then
 			# Only mention uninitialized submodules when its
-- 
1.6.4
Next: Junio C Hamano
Message 1 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.