]> git.ipfire.org Git - thirdparty/git.git/blame - t/t0055-beyond-symlinks.sh
The sixth batch
[thirdparty/git.git] / t / t0055-beyond-symlinks.sh
CommitLineData
806d13b1
JH
1#!/bin/sh
2
725b0605 3test_description='update-index and add refuse to add beyond symlinks'
806d13b1
JH
4
5. ./test-lib.sh
6
704a3143 7test_expect_success SYMLINKS setup '
806d13b1
JH
8 >a &&
9 mkdir b &&
10 ln -s b c &&
11 >c/d &&
12 git update-index --add a b/d
13'
14
704a3143 15test_expect_success SYMLINKS 'update-index --add beyond symlinks' '
806d13b1
JH
16 test_must_fail git update-index --add c/d &&
17 ! ( git ls-files | grep c/d )
18'
19
704a3143 20test_expect_success SYMLINKS 'add beyond symlinks' '
725b0605
JH
21 test_must_fail git add c/d &&
22 ! ( git ls-files | grep c/d )
23'
24
806d13b1 25test_done