]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-submodule.sh
http: refactor finish_http_pack_request()
[thirdparty/git.git] / git-submodule.sh
index 89f915cae99b12d134aeb7e72ec460dfe1e8e247..39ebdf25b5f7128dee92adda8311c83a3e605b4f 100755 (executable)
@@ -48,6 +48,8 @@ depth=
 progress=
 dissociate=
 single_branch=
+jobs=
+recommend_shallow=
 
 die_if_unmatched ()
 {
@@ -803,27 +805,7 @@ cmd_set_url() {
                shift
        done
 
-       if test $# -ne 2
-       then
-               usage
-       fi
-
-       # we can't use `git submodule--helper name` here because internally, it
-       # hashes the path so a trailing slash could lead to an unintentional no match
-       name="$(git submodule--helper list "$1" | cut -f2)"
-       if test -z "$name"
-       then
-               exit 1
-       fi
-
-       url="$2"
-       if test -z "$url"
-       then
-               exit 1
-       fi
-
-       git submodule--helper config submodule."$name".url "$url"
-       git submodule--helper sync ${GIT_QUIET:+--quiet} "$name"
+       git ${wt_prefix:+-C "$wt_prefix"} ${prefix:+--super-prefix "$prefix"} submodule--helper set-url ${GIT_QUIET:+--quiet} -- "$@"
 }
 
 #