Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
submodule-config: verify submodule names as paths
[gitweb.git]
/
git-submodule.sh
diff --git
a/git-submodule.sh
b/git-submodule.sh
index c0d0e9a4c63495d4522666b6edf984c01c0cfa23..92750b9e2fc54a451f7fe9dad42737861e47dbb7 100755
(executable)
--- a/
git-submodule.sh
+++ b/
git-submodule.sh
@@
-228,6
+228,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