Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v3 2/2] Move git-dir for submodules

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:49

Fredrik Gustafsson [off-list ref] writes:
quoted hunk
diff --git a/git-submodule.sh b/git-submodule.sh
index bc1d3fa..ace6c1d 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -122,14 +122,53 @@ module_clone()
 	path=$1
 	url=$2
 	reference="$3"
+	gitdir=
+	gitdir_base=
+	name=$(module_name "$path")
+	if test -z "$name"
+	then
+		name="$path"
+	fi
This conditional is not needed; module_name dies when it cannot find the
name for the path, as it should.

If the defaulting to the path itself were a good idea (which I do not
think it is), that should be done in module_name so that other callers
that tried to find the name for a given path that does not have a named
module would get a consistent result.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help