3 # Copyright (c) 2006 Shawn Pearce
6 test_description
='git reset should cull empty subdirs'
10 'creating initial files' \
12 cp "$TEST_DIRECTORY"/../COPYING path0/COPYING &&
13 git add path0/COPYING &&
17 'creating second files' \
20 cp "$TEST_DIRECTORY"/../COPYING path1/path2/COPYING &&
21 cp "$TEST_DIRECTORY"/../COPYING path1/COPYING &&
22 cp "$TEST_DIRECTORY"/../COPYING COPYING &&
23 cp "$TEST_DIRECTORY"/../COPYING path0/COPYING-TOO &&
24 git add path1/path2/COPYING &&
25 git add path1/COPYING &&
27 git add path0/COPYING-TOO &&
28 git commit -m change -a'
31 'resetting tree HEAD^' \
32 'git reset --hard HEAD^'
35 'checking initial files exist after rewind' \
37 test -f path0/COPYING'
40 'checking lack of path1/path2/COPYING' \
41 '! test -f path1/path2/COPYING'
44 'checking lack of path1/COPYING' \
45 '! test -f path1/COPYING'
48 'checking lack of COPYING' \
52 'checking checking lack of path1/COPYING-TOO' \
53 '! test -f path0/COPYING-TOO'
56 'checking lack of path1/path2' \
57 '! test -d path1/path2'
60 'checking lack of path1' \