[PATCH 1/5] Add testcase for 'git submodule' with url.*.insteadOf set in the super-repo
- From
Johan Herland <johan@herland.net>
- Date
- Aug 3, 2008, 23:00 UTC
- Message-ID
- <200808040100.02944.johan@herland.net>
- In-Reply-To
- <200808040057.00221.johan@herland.net>
Currently, setting url.*.insteadOf in the super-repo in order to rewrite submodule URLs, don't work. When cloning/fetching the submodule, the super-repo config is never consulted, and thus the url.*.insteadOf rule is never seen. This adds a testcase that confirms the current behaviour.
Signed-off-by: Johan Herland <johan@herland.net> --- t/t7400-submodule-basic.sh | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index cbc0c34..bafc46c 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -209,4 +209,15 @@ test_expect_success 'update --init' ' ' +test_expect_failure 'update --init with url.*.insteadOf' ' + + rm -rf init && + git config -f .gitmodules submodule.example.url "http://example.com/init2" && + git config --remove-section submodule.example + git config "url.$(pwd)/.insteadOf" "http://example.com/" && + git submodule update --init init && + test -d init/.git + +' + test_done
-- 1.6.0.rc1.34.g0fe8c