reflog: fix expire --single-worktree
[git/gitster.git] / t / t6136-pathspec-in-bare.sh
blobae8b5379e24d52c559e0d02da6f95fdbc40874c8
1 #!/bin/sh
3 test_description='diagnosing out-of-scope pathspec'
5 TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
8 test_expect_success 'setup a bare and non-bare repository' '
9 test_commit file1 &&
10 git clone --bare . bare
13 test_expect_success 'log and ls-files in a bare repository' '
15 cd bare &&
16 test_must_fail git log -- .. >out 2>err &&
17 test_must_be_empty out &&
18 test_i18ngrep "outside repository" err &&
20 test_must_fail git ls-files -- .. >out 2>err &&
21 test_must_be_empty out &&
22 test_i18ngrep "outside repository" err
26 test_expect_success 'log and ls-files in .git directory' '
28 cd .git &&
29 test_must_fail git log -- .. >out 2>err &&
30 test_must_be_empty out &&
31 test_i18ngrep "outside repository" err &&
33 test_must_fail git ls-files -- .. >out 2>err &&
34 test_must_be_empty out &&
35 test_i18ngrep "outside repository" err
39 test_done