X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=git-submodule.sh;h=7e27d0a0da4d130f9ccb92612848da8e219427a0;hb=68f95b26e43f8183b9d1cdd41f42e99da43152bf;hp=24914963ca23c837e0cc46ca2dc0fa46bf9886a6;hpb=a8d45dcfc075ada5d624b43e2b365cbcde564779;p=thirdparty%2Fgit.git diff --git a/git-submodule.sh b/git-submodule.sh index 24914963ca..7e27d0a0da 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