object-store: factor out odb_clear_loose_cache()
[git.git] / t / t7417-submodule-path-url.sh
blob756af8c4d6fbd1ba9fb2e4d6fd5b8ae9ddfc34e1
1 #!/bin/sh
3 test_description='check handling of .gitmodule path with dash'
4 . ./test-lib.sh
6 test_expect_success 'create submodule with dash in path' '
7 git init upstream &&
8 git -C upstream commit --allow-empty -m base &&
9 git submodule add ./upstream sub &&
10 git mv sub ./-sub &&
11 git commit -m submodule
14 test_expect_success 'clone rejects unprotected dash' '
15 test_when_finished "rm -rf dst" &&
16 git clone --recurse-submodules . dst 2>err &&
17 test_i18ngrep ignoring err
20 test_expect_success 'fsck rejects unprotected dash' '
21 test_when_finished "rm -rf dst" &&
22 git init --bare dst &&
23 git -C dst config transfer.fsckObjects true &&
24 test_must_fail git push dst HEAD 2>err &&
25 grep gitmodulesPath err
28 test_done