]> git.ipfire.org Git - thirdparty/git.git/blame - t/t6136-pathspec-in-bare.sh
The third batch
[thirdparty/git.git] / t / t6136-pathspec-in-bare.sh
CommitLineData
5c203986
ES
1#!/bin/sh
2
3test_description='diagnosing out-of-scope pathspec'
4
d96fb140 5TEST_PASSES_SANITIZE_LEAK=true
5c203986
ES
6. ./test-lib.sh
7
8test_expect_success 'setup a bare and non-bare repository' '
9 test_commit file1 &&
10 git clone --bare . bare
11'
12
13test_expect_success 'log and ls-files in a bare repository' '
14 (
15 cd bare &&
16 test_must_fail git log -- .. >out 2>err &&
17 test_must_be_empty out &&
6789275d 18 test_grep "outside repository" err &&
5c203986
ES
19
20 test_must_fail git ls-files -- .. >out 2>err &&
21 test_must_be_empty out &&
6789275d 22 test_grep "outside repository" err
5c203986
ES
23 )
24'
25
26test_expect_success 'log and ls-files in .git directory' '
27 (
28 cd .git &&
29 test_must_fail git log -- .. >out 2>err &&
30 test_must_be_empty out &&
6789275d 31 test_grep "outside repository" err &&
5c203986
ES
32
33 test_must_fail git ls-files -- .. >out 2>err &&
34 test_must_be_empty out &&
6789275d 35 test_grep "outside repository" err
5c203986
ES
36 )
37'
38
39test_done