X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=git-submodule.sh;h=8f260fbd9ca4a38ce78d8a29957cabbe3e26fb4b;hb=68061e3470210703cb15594194718d35094afdc0;hp=66d1ae8ef6c5f12c856a2f88eabce515dcafd489;hpb=95d25c412d140698ac0084bd94dcde8ecdcd332d;p=thirdparty%2Fgit.git diff --git a/git-submodule.sh b/git-submodule.sh index 66d1ae8ef6..8f260fbd9c 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -229,6 +229,11 @@ Use -f if you really want to add it." >&2 sm_name="$sm_path" fi + if ! git submodule--helper check-name "$sm_name" + then + die "$(eval_gettext "'$sm_name' is not a valid submodule name")" + fi + # perhaps the path exists and is already a git repo, else clone it if test -e "$sm_path" then