t7400: sync only works on initialized submodules
authorW. Trevor King <wking@tremily.us>
Mon, 3 Dec 2012 12:57:40 +0000 (07:57 -0500)
committerW. Trevor King <wking@tremily.us>
Mon, 3 Dec 2012 14:40:54 +0000 (09:40 -0500)
So initialize the submodule before syncing.  It's possible that `sync`
(and other submodule commands) should grow an --init option in the
style of `update`, but I've avoided that for now.

Signed-off-by: W. Trevor King <wking@tremily.us>
t/t7400-submodule-basic.sh

index 1a9ac078386907d9c1cc0da22ed58789793734ca..97be72faca482803e6ee8d5ccf42b0106a4d0073 100755 (executable)
@@ -478,6 +478,7 @@ test_expect_success 'use superproject as upstream when path is relative and no u
                cd addtest &&
                git submodule add ../repo relative &&
                test "$(git config -f .gitmodules submodule.relative.url)" = ../repo &&
+               git submodule init relative &&
                git submodule sync relative &&
                test "$(git config submodule.relative.url)" = "$submodurl/repo"
        )