Skip to content

Commit 0b26d1e

Browse files
committed
Merge branch 'tc/submodule-clone-name-detection'
* tc/submodule-clone-name-detection: submodule::module_clone(): silence die() message from module_name() submodule: whitespace fix
2 parents 208a1cc + 9e76d4a commit 0b26d1e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

git-submodule.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ module_name()
104104
re=$(printf '%s\n' "$1" | sed -e 's/[].[^$\\*]/\\&/g')
105105
name=$( git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
106106
sed -n -e 's|^submodule\.\(.*\)\.path '"$re"'$|\1|p' )
107-
test -z "$name" &&
108-
die "$(eval_gettext "No submodule mapping found in .gitmodules for path '\$path'")"
109-
echo "$name"
107+
test -z "$name" &&
108+
die "$(eval_gettext "No submodule mapping found in .gitmodules for path '\$path'")"
109+
echo "$name"
110110
}
111111

112112
#
@@ -130,7 +130,7 @@ module_clone()
130130

131131
gitdir=
132132
gitdir_base=
133-
name=$(module_name "$path")
133+
name=$(module_name "$path" 2>/dev/null)
134134
base_path=$(dirname "$path")
135135

136136
gitdir=$(git rev-parse --git-dir)

0 commit comments

Comments
 (0)