Re: [PATCH 2/3] Add gitmodules(5)
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:15
Sven Verdoolaege [off-list ref] writes:
quoted
quoted
Why?It addresses Junio's concern about ambiguity and confusion.Junio, is this really what you meant?
I think I initially misread Lars's patch and log message that
said:
This teaches git-submodule to check module.*.path when looking for the
config for a submodule path. If no match is found it falls back to the
current behaviour (module.$path).
Somehow I thought that it would make it ambiguous to have
module.$name.path and module.$path when answering the question:
"given a name of a module how would you find which path to bind
it to".
But I do not think it is a problem; at least "ambiguity" worry
is unfounded. This section, without "path = " line:
[module "foo"]
url = ...
is equivalent to have "path = foo" in it. Finding path from
module name is well defined.
The other, finding what module should go to a given path, is not
well defined. IOW, you would not know which module you want at
the path bar/ when you have:
[module "foo"]
url = ...
path = bar
[module "bar"]
url = ...
But that problem exists with or without these "module.*.path
and module.$path", so it cannot be an argument against the
definition of the fallback behaviour.