Merge branch 'jc/relnotes-v0-extension-update' into master
[git/raj.git] / t / t6136-pathspec-in-bare.sh
blobb117251366dd6fa1f3e6cd59c03bcefd88811405
1 #!/bin/sh
3 test_description='diagnosing out-of-scope pathspec'
5 . ./test-lib.sh
7 test_expect_success 'setup a bare and non-bare repository' '
8 test_commit file1 &&
9 git clone --bare . bare
12 test_expect_success 'log and ls-files in a bare repository' '
14 cd bare &&
15 test_must_fail git log -- .. >out 2>err &&
16 test_must_be_empty out &&
17 test_i18ngrep "outside repository" err &&
19 test_must_fail git ls-files -- .. >out 2>err &&
20 test_must_be_empty out &&
21 test_i18ngrep "outside repository" err
25 test_expect_success 'log and ls-files in .git directory' '
27 cd .git &&
28 test_must_fail git log -- .. >out 2>err &&
29 test_must_be_empty out &&
30 test_i18ngrep "outside repository" err &&
32 test_must_fail git ls-files -- .. >out 2>err &&
33 test_must_be_empty out &&
34 test_i18ngrep "outside repository" err
38 test_done