| # Copyright (c) 2008 David Aguilar |
| test_description='git submodule sync |
| These tests exercise the "git submodule sync" subcommand. |
| test_expect_success setup ' |
| git clone super submodule && |
| git submodule add ../submodule submodule && |
| git commit -m "submodule" |
| git clone super super-clone && |
| (cd super-clone && git submodule update --init) |
| test_expect_success 'change submodule' ' |
| echo second line >> file && |
| git commit -a -m "change submodule" |
| test_expect_success 'change submodule url' ' |
| mv submodule moved-submodule && |
| git config -f .gitmodules submodule.submodule.url ../moved-submodule |
| git commit -a -m moved-submodule |
| test_expect_success '"git submodule sync" should update submodule URLs' ' |
| test -d "$(git config -f super-clone/submodule/.git/config \ |
| (cd super-clone/submodule && |