diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-10-26 16:16:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-26 16:16:32 -0700 |
commit | 0b26d1e8b29a4248d56078318fec6906e3007742 (patch) | |
tree | d6f9e6e1a143da3600bd8a93fdfb50d6aa9567bb /git-submodule.sh | |
parent | 208a1cc3d37f7c0f770440095fd3fa621f3ce006 (diff) | |
parent | 9e76d4a8345b247395b902307407ba4eac737524 (diff) | |
download | git-0b26d1e8b29a4248d56078318fec6906e3007742.tar.gz |
Merge branch 'tc/submodule-clone-name-detection'
* tc/submodule-clone-name-detection:
submodule::module_clone(): silence die() message from module_name()
submodule: whitespace fix
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-x | git-submodule.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index 928a62f626..3adab93635 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) |