git hook run: add an --ignore-missing flag
[alt-git.git] / t / t2005-checkout-index-symlinks.sh
blob112682a45a1df3d5c19eab03ec79c1202d2cab71
1 #!/bin/sh
3 # Copyright (c) 2007 Johannes Sixt
6 test_description='git checkout-index on filesystem w/o symlinks test.
8 This tests that git checkout-index creates a symbolic link as a plain
9 file if core.symlinks is false.'
11 TEST_PASSES_SANITIZE_LEAK=true
12 . ./test-lib.sh
14 test_expect_success \
15 'preparation' '
16 git config core.symlinks false &&
17 l=$(printf file | git hash-object -t blob -w --stdin) &&
18 echo "120000 $l symlink" | git update-index --index-info'
20 test_expect_success \
21 'the checked-out symlink must be a file' '
22 git checkout-index symlink &&
23 test -f symlink'
25 test_expect_success \
26 'the file must be the blob we added during the setup' '
27 test "$(git hash-object -t blob symlink)" = $l'
29 test_done