From: Heiko Voigt Date: Mon, 06 Jun 2011 20:57:32 GMT Subject: [RFC PATCH 2/2] add update 'none' flag to disable update of submodule by default Message-ID: <6d70cfcf08e7ff99d090a3d0e4f730e4f638d050.1307374519.git.hvoigt@hvoigt.net> In-Reply-To: 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. TODO: Documentation/Tests --- git-submodule.sh | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 70dfc7b..77977b5 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -423,6 +423,9 @@ cmd_update() --recursive) recursive=1 ;; + --checkout) + update="checkout" + ;; --) shift break @@ -461,6 +464,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 -- 1.7.5.1.219.g4c6b2