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.<name>.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