]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-submodule.sh
submodule add: clean up duplicated code
[thirdparty/git.git] / git-submodule.sh
index 0c984a898320ef495544b1d8bb7602aefe647447..32cb05443a851e7bd77d86b3bb3b2f7962c4d53b 100755 (executable)
@@ -238,15 +238,7 @@ cmd_add()
                        die "'$path' already exists and is not a valid git repo"
                fi
 
-               case "$repo" in
-               ./*|../*)
-                       url=$(resolve_relative_url "$repo") || exit
-                   ;;
-               *)
-                       url="$repo"
-                       ;;
-               esac
-               git config submodule."$path".url "$url"
+               git config submodule."$path".url "$realrepo"
        else
 
                module_clone "$path" "$realrepo" "$reference" || exit