3 test_description
='fetching and pushing project with subproject'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 test_expect_success setup
'
15 git commit -m "subproject commit #1"
18 git add sub mainfile &&
20 git commit -m "superproject commit #1"
23 test_expect_success clone
'
24 git clone "file://$(pwd)/.git" cloned &&
25 (git rev-parse HEAD && git ls-files -s) >expected &&
28 (git rev-parse HEAD && git ls-files -s) >../actual
30 test_cmp expected actual
33 test_expect_success advance
'
34 echo more >mainfile &&
35 git update-index --force-remove sub &&
36 mv sub/.git sub/.git-disabled &&
37 git add sub/subfile mainfile &&
38 mv sub/.git-disabled sub/.git &&
40 git commit -m "superproject commit #2"
43 test_expect_success fetch
'
44 (git rev-parse HEAD && git ls-files -s) >expected &&
48 (git rev-parse HEAD && git ls-files -s) >../actual
50 test_cmp expected actual