gitworkflows: fix grammar in 'Merge upwards' rule
[gitweb.git] / git-submodule.sh
index 66d1ae8ef6c5f12c856a2f88eabce515dcafd489..8f260fbd9ca4a38ce78d8a29957cabbe3e26fb4b 100755 (executable)
@@ -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