3 test_description
='verify safe.directory checks'
7 GIT_TEST_ASSUME_DIFFERENT_OWNER
=1
8 export GIT_TEST_ASSUME_DIFFERENT_OWNER
10 expect_rejected_dir
() {
11 test_must_fail git status
2>err
&&
12 grep "dubious ownership" err
15 test_expect_success
'safe.directory is not set' '
19 test_expect_success
'safe.directory does not match' '
20 git config --global safe.directory bogus &&
24 test_expect_success
'path exist as different key' '
25 git config --global foo.bar "$(pwd)" &&
29 test_expect_success
'safe.directory matches' '
30 git config --global --add safe.directory "$(pwd)" &&
34 test_expect_success
'safe.directory matches, but is reset' '
35 git config --global --add safe.directory "" &&
39 test_expect_success
'safe.directory=*' '
40 git config --global --add safe.directory "*" &&
44 test_expect_success
'safe.directory=*, but is reset' '
45 git config --global --add safe.directory "" &&