X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-submodule.sh;h=82ac28fa27dc41b821905f1a83155994d56c4f3b;hb=4e0da76318c44436286eeeca2b711d82c1098493;hp=1c656be1cfb6eb7d63e6a1f3cdda959cf90aca89;hpb=8f321a39257a06db014a3b6ae5dce839821cdb16;p=git.git diff --git a/git-submodule.sh b/git-submodule.sh index 1c656be1c..82ac28fa2 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -74,7 +74,7 @@ resolve_relative_url () module_name() { # Do we have "submodule..path = $1" defined in .gitmodules file? - re=$(printf '%s' "$1" | sed -e 's/\([^a-zA-Z0-9_]\)/\\\1/g') + re=$(printf '%s' "$1" | sed -e 's/[].[^$\\*]/\\&/g') name=$( GIT_CONFIG=.gitmodules \ git config --get-regexp '^submodule\..*\.path$' | sed -n -e 's|^submodule\.\(.*\)\.path '"$re"'$|\1|p' )