git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Make 'submodule update' honor the 'update' setting in .gitmodules.
@ 2009-08-06  3:36 Mikhail Glushenkov
  0 siblings, 0 replies; 3+ messages in thread
From: Mikhail Glushenkov @ 2009-08-06  3:36 UTC (permalink / raw)
  To: git; +Cc: Mikhail Glushenkov

Make the 'submodule update' command use 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 <the.dead.shall.rise@gmail.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

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [PATCH] Make 'submodule update' honor the 'update' setting in .gitmodules.
@ 2009-08-06  3:56 Mikhail Glushenkov
  2009-08-07 21:54 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Mikhail Glushenkov @ 2009-08-06  3:56 UTC (permalink / raw)
  To: git; +Cc: gitster, Mikhail Glushenkov

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-07 21:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-06  3:36 [PATCH] Make 'submodule update' honor the 'update' setting in .gitmodules Mikhail Glushenkov
  -- strict thread matches above, loose matches on Subject: below --
2009-08-06  3:56 Mikhail Glushenkov
2009-08-07 21:54 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).