submodule update: allow '.' for branch value
[gitweb.git] / git-submodule.sh
index 40639ee2310a300abe854c87f1e8a277344b3c67..8c5e8982ab9980daf14b144a5b41b191289fb1a2 100755 (executable)
@@ -589,7 +589,6 @@ cmd_update()
 
                name=$(git submodule--helper name "$sm_path") || exit
                url=$(git config submodule."$name".url)
-               branch=$(get_submodule_config "$name" branch master)
                if ! test -z "$update"
                then
                        update_module=$update
@@ -615,6 +614,7 @@ cmd_update()
 
                if test -n "$remote"
                then
+                       branch=$(git submodule--helper remote-branch "$sm_path")
                        if test -z "$nofetch"
                        then
                                # Fetch remote before determining tracking $sha1