diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-10-30 15:43:47 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-10-30 15:43:48 +0900 |
commit | 67224b7b5a51223e933467204d077c658b367b42 (patch) | |
tree | ad04755ccfa3262a7b3372165b2666244ff6902d /t/t2000-checkout-cache-clash.sh | |
parent | Merge branch 'ah/doc-updates' (diff) | |
parent | t7501: rename commit test to comply with naming convention (diff) | |
download | tgif-67224b7b5a51223e933467204d077c658b367b42.tar.xz |
Merge branch 'ss/rename-tests'
Reorganize some tests and rename them; "ls t/" now gives a better
overview of what is tested for these scripts than before.
* ss/rename-tests:
t7501: rename commit test to comply with naming convention
t7500: rename commit tests script to comply with naming convention
t7502: rename commit test script to comply with naming convention
t7509: cleanup description and filename
t2000: rename and combine checkout clash tests
Diffstat (limited to 't/t2000-checkout-cache-clash.sh')
-rwxr-xr-x | t/t2000-checkout-cache-clash.sh | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/t/t2000-checkout-cache-clash.sh b/t/t2000-checkout-cache-clash.sh deleted file mode 100755 index de3edb5d57..0000000000 --- a/t/t2000-checkout-cache-clash.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2005 Junio C Hamano -# - -test_description='git checkout-index test. - -This test registers the following filesystem structure in the -cache: - - path0 - a file - path1/file1 - a file in a directory - -And then tries to checkout in a work tree that has the following: - - path0/file0 - a file in a directory - path1 - a file - -The git checkout-index command should fail when attempting to checkout -path0, finding it is occupied by a directory, and path1/file1, finding -path1 is occupied by a non-directory. With "-f" flag, it should remove -the conflicting paths and succeed. -' -. ./test-lib.sh - -date >path0 -mkdir path1 -date >path1/file1 - -test_expect_success \ - 'git update-index --add various paths.' \ - 'git update-index --add path0 path1/file1' - -rm -fr path0 path1 -mkdir path0 -date >path0/file0 -date >path1 - -test_expect_success \ - 'git checkout-index without -f should fail on conflicting work tree.' \ - 'test_must_fail git checkout-index -a' - -test_expect_success \ - 'git checkout-index with -f should succeed.' \ - 'git checkout-index -f -a' - -test_expect_success \ - 'git checkout-index conflicting paths.' \ - 'test -f path0 && test -d path1 && test -f path1/file1' - -test_expect_success SYMLINKS 'checkout-index -f twice with --prefix' ' - mkdir -p tar/get && - ln -s tar/get there && - echo first && - git checkout-index -a -f --prefix=there/ && - echo second && - git checkout-index -a -f --prefix=there/ -' - -test_done |