X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-submodule.sh;h=3adab9363563e80e4ceb2c7fb5c3ab91ac1ef505;hb=39af78961d8e7f4c0aee73e77e9eb5b6033f79c2;hp=928a62f626fe7ff1db8239713d94ff9aa25158eb;hpb=208a1cc3d37f7c0f770440095fd3fa621f3ce006;p=git.git diff --git a/git-submodule.sh b/git-submodule.sh index 928a62f62..3adab9363 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -104,9 +104,9 @@ module_name() re=$(printf '%s\n' "$1" | sed -e 's/[].[^$\\*]/\\&/g') name=$( git config -f .gitmodules --get-regexp '^submodule\..*\.path$' | sed -n -e 's|^submodule\.\(.*\)\.path '"$re"'$|\1|p' ) - test -z "$name" && - die "$(eval_gettext "No submodule mapping found in .gitmodules for path '\$path'")" - echo "$name" + test -z "$name" && + die "$(eval_gettext "No submodule mapping found in .gitmodules for path '\$path'")" + echo "$name" } # @@ -130,7 +130,7 @@ module_clone() gitdir= gitdir_base= - name=$(module_name "$path") + name=$(module_name "$path" 2>/dev/null) base_path=$(dirname "$path") gitdir=$(git rev-parse --git-dir)