Re: [PATCH 2/3] Add gitmodules(5)
- From
- Lars Hjemli <hjemli@gmail.com>
- Date
- Jun 11, 2007, 10:47 UTC
- Message-ID
- <8c5c35580706110347u55a944ds86f06dabce9e6435@mail.gmail.com>
- In-Reply-To
- <20070611083406.GH955MdfPADPa@greensroom.kotnet.org>
On 6/11/07, Sven Verdoolaege <skimo@kotnet.org> wrote:
Show 6 quoted lines
> On Sun, Jun 10, 2007 at 11:14:27PM +0200, Lars Hjemli wrote: > > And I'll drop the "unless otherwise > > noted, name=path" behaviour. If we later decide it would be useful we > > can always "re-add" it. > > So every (sub)module subsection will have to have a path element?
Yes
> Why?
It addresses Junio's concern about ambiguity and confusion. And it felt like the 'safe choice', i.e. starting out with a strict rule and possibly loosen it later on is a lot easier than starting loose and then trying to make it stricter.
Btw: adding support for the optional path specification on top of my latest patch-series is trivial:
diff --git a/git-submodule.sh b/git-submodule.sh index 89a3885..297272b 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -34,8 +34,7 @@ module_name() { name=$(GIT_CONFIG=.gitmodules git-config --get-regexp '^submodule\..*\.path$' "$1" | sed -nre 's/^submodule\.(.+)\.path .+$/\1/p') - test -z "$name" && - die "No submodule mapping found in .gitmodules for path '$path'" + test -z "$name" && name="$path" echo "$name" } -- larsh