]> git.ipfire.org Git - thirdparty/git.git/blame - t/t4053-diff-no-index.sh
Merge branch 'da/gitk-reload-tag-contents'
[thirdparty/git.git] / t / t4053-diff-no-index.sh
CommitLineData
f3999e03
BP
1#!/bin/sh
2
3test_description='diff --no-index'
4
5. ./test-lib.sh
6
7test_expect_success 'setup' '
8 mkdir a &&
9 mkdir b &&
10 echo 1 >a/1 &&
546e0fd9
JK
11 echo 2 >a/2 &&
12 git init repo &&
13 echo 1 >repo/a &&
14 mkdir -p non/git &&
15 echo 1 >non/git/a &&
16 echo 1 >non/git/b
f3999e03
BP
17'
18
19test_expect_success 'git diff --no-index directories' '
20 git diff --no-index a b >cnt
21 test $? = 1 && test_line_count = 14 cnt
22'
23
546e0fd9
JK
24test_expect_success 'git diff --no-index relative path outside repo' '
25 (
26 cd repo &&
27 test_expect_code 0 git diff --no-index a ../non/git/a &&
28 test_expect_code 0 git diff --no-index ../non/git/a ../non/git/b
29 )
30'
31
f3999e03 32test_done