From 322bb6e12f713900dcac7cac59c00a167f70f2c3 Mon Sep 17 00:00:00 2001 From: Heiko Voigt Date: Thu, 11 Aug 2011 19:51:46 +0200 Subject: add update 'none' flag to disable update of submodule by default This is useful to mark a submodule as unneeded by default. When this option is set and the user wants to work with such a submodule he needs to configure 'submodule..update=checkout' or pass the --checkout option. Then the submodule can be handled like a normal submodule. Signed-off-by: Heiko Voigt Signed-off-by: Junio C Hamano --- git-submodule.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'git-submodule.sh') diff --git a/git-submodule.sh b/git-submodule.sh index e544dbc917..34d2be6ef0 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -429,6 +429,9 @@ cmd_update() --recursive) recursive=1 ;; + --checkout) + update="checkout" + ;; --) shift break @@ -468,6 +471,12 @@ cmd_update() update_module=$(git config submodule."$name".update) fi + if test "$update_module" = "none" + then + echo "Skipping submodule '$path'" + continue + fi + if test -z "$url" then # Only mention uninitialized submodules when its -- cgit v1.3