submodule update: run custom update script for initial populating as well
[gitweb.git] / git-submodule.sh
index b57f87de658b627c48ec672faaab3dc6aac3b505..f1d3324be908c330657a8a438b466e54e2295fdb 100755 (executable)
@@ -605,7 +605,10 @@ cmd_update()
                if test $just_cloned -eq 1
                then
                        subsha1=
-                       update_module=checkout
+                       case "$update_module" in
+                       merge | rebase | none)
+                               update_module=checkout ;;
+                       esac
                else
                        subsha1=$(sanitize_submodule_env; cd "$sm_path" &&
                                git rev-parse --verify HEAD) ||