]> git.ipfire.org Git - thirdparty/git.git/blob - t/t9152-svn-empty-dirs-after-gc.sh
path.c: don't call the match function without value in trie_find()
[thirdparty/git.git] / t / t9152-svn-empty-dirs-after-gc.sh
1 #!/bin/sh
2 #
3 # Copyright (c) 2009 Robert Zeh
4
5 test_description='git svn creates empty directories, calls git gc, makes sure they are still empty'
6 . ./lib-git-svn.sh
7
8 test_expect_success 'initialize repo' '
9 for i in a b c d d/e d/e/f "weird file name"
10 do
11 svn_cmd mkdir -m "mkdir $i" "$svnrepo"/"$i"
12 done
13 '
14
15 test_expect_success 'clone' 'git svn clone "$svnrepo" cloned'
16
17 test_expect_success 'git svn gc runs' '
18 (
19 cd cloned &&
20 git svn gc
21 )
22 '
23
24 test_expect_success 'git svn mkdirs recreates empty directories after git svn gc' '
25 (
26 cd cloned &&
27 rm -r * &&
28 git svn mkdirs &&
29 for i in a b c d d/e d/e/f "weird file name"
30 do
31 if ! test -d "$i"
32 then
33 echo >&2 "$i does not exist" &&
34 exit 1
35 fi
36 done
37 )
38 '
39
40 test_done