File tree Expand file tree Collapse file tree 11 files changed +36
-26
lines changed Expand file tree Collapse file tree 11 files changed +36
-26
lines changed Original file line number Diff line number Diff line change @@ -50,12 +50,12 @@ test_expect_success 'setup separate repository lacking postimage' '
50
50
51
51
git tar-tree initial initial | tar xf - &&
52
52
(
53
- cd initial && git init-db && git add .
53
+ cd initial && git_init_db && git add .
54
54
) &&
55
55
56
56
git tar-tree second second | tar xf - &&
57
57
(
58
- cd second && git init-db && git add .
58
+ cd second && git_init_db && git add .
59
59
)
60
60
61
61
'
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ test_expect_success \
44
44
' unpack without delta' \
45
45
" GIT_OBJECT_DIRECTORY=.git2/objects &&
46
46
export GIT_OBJECT_DIRECTORY &&
47
- git-init-db &&
47
+ git_init_db &&
48
48
git-unpack-objects -n <test-1-${packname_1} .pack &&
49
49
git-unpack-objects <test-1-${packname_1} .pack"
50
50
@@ -75,7 +75,7 @@ test_expect_success \
75
75
' unpack with delta' \
76
76
' GIT_OBJECT_DIRECTORY=.git2/objects &&
77
77
export GIT_OBJECT_DIRECTORY &&
78
- git-init-db &&
78
+ git_init_db &&
79
79
git-unpack-objects -n <test-2-${packname_2}.pack &&
80
80
git-unpack-objects <test-2-${packname_2}.pack'
81
81
@@ -100,7 +100,7 @@ test_expect_success \
100
100
' use packed objects' \
101
101
' GIT_OBJECT_DIRECTORY=.git2/objects &&
102
102
export GIT_OBJECT_DIRECTORY &&
103
- git-init-db &&
103
+ git_init_db &&
104
104
cp test-1-${packname_1}.pack test-1-${packname_1}.idx .git2/objects/pack && {
105
105
git-diff-tree --root -p $commit &&
106
106
while read object
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ test_expect_success setup '
24
24
parent=$commit || return 1
25
25
done &&
26
26
git-update-ref HEAD "$commit" &&
27
- git-clone -l ./. victim &&
27
+ git_clone -l ./. victim &&
28
28
cd victim &&
29
29
git-log &&
30
30
cd .. &&
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ pull_to_client () {
97
97
(
98
98
mkdir client &&
99
99
cd client &&
100
- git-init-db 2>> log2.txt
100
+ git_init_db 2>> log2.txt
101
101
)
102
102
103
103
add A1
Original file line number Diff line number Diff line change @@ -15,20 +15,20 @@ test_expect_success setup '
15
15
git commit -a -m original'
16
16
17
17
test_expect_success " clone and setup child repos" '
18
- git clone . one &&
18
+ git_clone . one &&
19
19
cd one &&
20
20
echo >file updated by one &&
21
21
git commit -a -m "updated by one" &&
22
22
cd .. &&
23
- git clone . two &&
23
+ git_clone . two &&
24
24
cd two &&
25
25
git repo-config branch.master.remote one &&
26
26
{
27
27
echo "URL: ../one/.git/"
28
28
echo "Pull: refs/heads/master:refs/heads/one"
29
29
} >.git/remotes/one
30
30
cd .. &&
31
- git clone . three &&
31
+ git_clone . three &&
32
32
cd three &&
33
33
git repo-config branch.master.remote two &&
34
34
git repo-config branch.master.merge refs/heads/one &&
@@ -74,7 +74,7 @@ test_expect_success 'fetch following tags' '
74
74
75
75
mkdir four &&
76
76
cd four &&
77
- git init-db &&
77
+ git_init_db &&
78
78
79
79
git fetch .. :track &&
80
80
git show-ref --verify refs/tags/anno &&
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ test_expect_success setup '
17
17
test_expect_success ' pulling into void' '
18
18
mkdir cloned &&
19
19
cd cloned &&
20
- git init-db &&
20
+ git_init_db &&
21
21
git pull ..
22
22
'
23
23
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ remove the directory before attempting a clone again.'
13
13
14
14
test_expect_failure \
15
15
' clone of non-existent source should fail' \
16
- ' git-clone foo bar'
16
+ ' git_clone foo bar'
17
17
18
18
test_expect_failure \
19
19
' failed clone should not leave a directory' \
@@ -29,11 +29,11 @@ test_create_repo foo
29
29
# current path not to the target dir
30
30
test_expect_failure \
31
31
' clone of non-existent (relative to $PWD) source should fail' \
32
- ' git-clone ../foo baz'
32
+ ' git_clone ../foo baz'
33
33
34
34
test_expect_success \
35
35
' clone should work now that source exists' \
36
- ' git-clone foo bar'
36
+ ' git_clone foo bar'
37
37
38
38
test_expect_success \
39
39
' successfull clone must leave the directory' \
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ git commit -m initial'
17
17
cd " $base_dir "
18
18
19
19
test_expect_success ' preparing second repository' \
20
- ' git clone A B && cd B &&
20
+ ' git_clone A B && cd B &&
21
21
echo second > file2 &&
22
22
git add file2 &&
23
23
git commit -m addition &&
@@ -27,7 +27,7 @@ git prune'
27
27
cd " $base_dir "
28
28
29
29
test_expect_success ' cloning with reference' \
30
- ' git clone -l -s --reference B A C'
30
+ ' git_clone -l -s --reference B A C'
31
31
32
32
cd " $base_dir "
33
33
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ git prune'
34
34
cd " $base_dir "
35
35
36
36
test_expect_success ' preparing second repository' \
37
- ' git clone -l -s A B && cd B &&
37
+ ' git_clone -l -s A B && cd B &&
38
38
echo "foo bar" > file2 &&
39
39
git add file2 &&
40
40
git commit -m "next commit" file2 &&
@@ -44,7 +44,7 @@ git prune'
44
44
cd " $base_dir "
45
45
46
46
test_expect_success ' preparing third repository' \
47
- ' git clone -l -s B C && cd C &&
47
+ ' git_clone -l -s B C && cd C &&
48
48
echo "Goodbye, cruel world" > file3 &&
49
49
git add file3 &&
50
50
git commit -m "one more" file3 &&
@@ -54,11 +54,11 @@ git prune'
54
54
cd " $base_dir "
55
55
56
56
test_expect_failure ' creating too deep nesting' \
57
- ' git clone -l -s C D &&
58
- git clone -l -s D E &&
59
- git clone -l -s E F &&
60
- git clone -l -s F G &&
61
- git clone -l -s G H &&
57
+ ' git_clone -l -s C D &&
58
+ git_clone -l -s D E &&
59
+ git_clone -l -s E F &&
60
+ git_clone -l -s F G &&
61
+ git_clone -l -s G H &&
62
62
cd H &&
63
63
test_valid_repo'
64
64
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ test_expect_success \
88
88
89
89
test_expect_success " Michael Cassar's test case" '
90
90
rm -fr .git papers partA &&
91
- git init-db &&
91
+ git_init_db &&
92
92
mkdir -p papers/unsorted papers/all-papers partA &&
93
93
echo a > papers/unsorted/Thesis.pdf &&
94
94
echo b > partA/outline.txt &&
@@ -109,7 +109,7 @@ rm -fr papers partA path?
109
109
110
110
test_expect_success " Sergey Vlasov's test case" '
111
111
rm -fr .git &&
112
- git init-db &&
112
+ git_init_db &&
113
113
mkdir ab &&
114
114
date >ab.c &&
115
115
date >ab/d &&
Original file line number Diff line number Diff line change @@ -182,6 +182,16 @@ test_create_repo () {
182
182
cd " $owd "
183
183
}
184
184
185
+ # Many tests do init-db and clone but they must be told about the freshly
186
+ # built templates.
187
+ git_init_db () {
188
+ git init-db --template=" $GIT_EXEC_PATH /templates/blt/" " $@ "
189
+ }
190
+
191
+ git_clone () {
192
+ git clone --template=" $GIT_EXEC_PATH /templates/blt/" " $@ "
193
+ }
194
+
185
195
test_done () {
186
196
trap - exit
187
197
case " $test_failure " in
You can’t perform that action at this time.
0 commit comments