Note that relative repository arguments passed to
$ git submodule add <repository> [<path>]
are expanded relative to the superproject's remote URL, not relative
to the current working directory, which is why /foo/ shows up in the
configured URLs.
Signed-off-by: W. Trevor King <wking@tremily.us>
git config remote.origin.url ../foo/bar.git &&
git submodule add ../bar/a/b/c ./a/b/c &&
git submodule init &&
- test "$(git config submodule.a/b/c.url)" = ../foo/bar/a/b/c
+ test "$(git config submodule.a/b/c.url)" = ../foo/bar/a/b/c &&
+ test "$(cd a/b/c && git config remote.origin.url)" = ../../../../foo/bar/a/b/c
)
'