]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-submodule.sh
add update 'none' flag to disable update of submodule by default
[thirdparty/git.git] / git-submodule.sh
index e544dbc917b84dfe17597e90e9e48af5a1e5a196..34d2be6ef0a3373608ff8b89f59ed19043c59354 100755 (executable)
@@ -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