git submodule -b ... of current HEAD fails
[gitweb.git] / git-submodule.sh
index 9ebbab798d21147fc019b6183cad0c462c9dafca..09107467fe0b6e6713b527b822c8cd13b47a8e24 100755 (executable)
@@ -241,7 +241,7 @@ cmd_add()
                        # ash fails to wordsplit ${branch:+-b "$branch"...}
                        case "$branch" in
                        '') git checkout -f -q ;;
-                       ?*) git checkout -f -q -b "$branch" "origin/$branch" ;;
+                       ?*) git checkout -f -q -B "$branch" "origin/$branch" ;;
                        esac
                ) || die "Unable to checkout submodule '$path'"
        fi