]> asedeno.scripts.mit.edu Git - git.git/blobdiff - git-submodule.sh
gitweb: correct month in date display for atom feeds
[git.git] / git-submodule.sh
index 2cfeaddbc27fd00e089bcf2ffd76e1271f1f3eb9..b91d62632c2eecf701a473dfaf90874a19f90f98 100755 (executable)
@@ -47,7 +47,7 @@ get_repo_base() {
 module_name()
 {
        # Do we have "submodule.<something>.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' )
@@ -251,7 +251,7 @@ modules_list()
        done
 }
 
-while case "$#" in 0) break ;; esac
+while test $# != 0
 do
        case "$1" in
        add)
@@ -313,7 +313,7 @@ case "$add,$init,$update,$status,$cached" in
 ,,1,,)
        modules_update "$@"
        ;;
-,,,1,*)
+,,,*,*)
        modules_list "$@"
        ;;
 *)