1#!/bin/sh
2#
3# Copyright (c) 2009 Robert Zeh
4
5test_description='git svn creates empty directories, calls git gc, makes sure they are still empty'
6. ./lib-git-svn.sh
7
8test_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
15test_expect_success 'clone' 'git svn clone "$svnrepo" cloned'
16
17test_expect_success 'git svn gc runs' '
18 (
19 cd cloned &&
20 git svn gc
21 )
22'
23
24test_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
40test_done