@matheusbsbs / matheus-bagliano / commits / 171e800b37
Fork 0

Revert "fix testsuite: make sure they use templates freshly built from the source"

This reverts commit 74d20040cafdced657efbf49795183d209a3a07b. Version from Johannes to introduce GIT_TEMPLATE_DIR is simpler, although I unconsciously stayed away from introducing yet another environment variable.

Junio C Hamano committed Dec 19, 2006 at 01:14 UTC 171e800b374c98dd703e906bd9955b2b0410cabe
11 files changed +26 -36
t/t4116-apply-reverse.sh
+2 -2
@@ -50,12 +50,12 @@ test_expect_success 'setup separate repository lacking postimage' '
50
51 git tar-tree initial initial | tar xf - &&
52 (
53 - cd initial && git_init_db && git add .
53 + cd initial && git init-db && git add .
54 ) &&
55
56 git tar-tree second second | tar xf - &&
57 (
58 - cd second && git_init_db && git add .
58 + cd second && git init-db && git add .
59 )
60
61 '
t/t5300-pack-object.sh
+3 -3
@@ -44,7 +44,7 @@ test_expect_success \
44 'unpack without delta' \
45 "GIT_OBJECT_DIRECTORY=.git2/objects &&
46 export GIT_OBJECT_DIRECTORY &&
47 - git_init_db &&
47 + git-init-db &&
48 git-unpack-objects -n <test-1-${packname_1}.pack &&
49 git-unpack-objects <test-1-${packname_1}.pack"
50
@@ -75,7 +75,7 @@ test_expect_success \
75 'unpack with delta' \
76 'GIT_OBJECT_DIRECTORY=.git2/objects &&
77 export GIT_OBJECT_DIRECTORY &&
78 - git_init_db &&
78 + git-init-db &&
79 git-unpack-objects -n <test-2-${packname_2}.pack &&
80 git-unpack-objects <test-2-${packname_2}.pack'
81
@@ -100,7 +100,7 @@ test_expect_success \
100 'use packed objects' \
101 'GIT_OBJECT_DIRECTORY=.git2/objects &&
102 export GIT_OBJECT_DIRECTORY &&
103 - git_init_db &&
103 + git-init-db &&
104 cp test-1-${packname_1}.pack test-1-${packname_1}.idx .git2/objects/pack && {
105 git-diff-tree --root -p $commit &&
106 while read object
t/t5400-send-pack.sh
+1 -1
@@ -24,7 +24,7 @@ test_expect_success setup '
24 parent=$commit || return 1
25 done &&
26 git-update-ref HEAD "$commit" &&
27 - git_clone -l ./. victim &&
27 + git-clone -l ./. victim &&
28 cd victim &&
29 git-log &&
30 cd .. &&
t/t5500-fetch-pack.sh
+1 -1
@@ -97,7 +97,7 @@ pull_to_client () {
97 (
98 mkdir client &&
99 cd client &&
100 - git_init_db 2>> log2.txt
100 + git-init-db 2>> log2.txt
101 )
102
103 add A1
t/t5510-fetch.sh
+4 -4
@@ -15,12 +15,12 @@ test_expect_success setup '
15 git commit -a -m original'
16
17 test_expect_success "clone and setup child repos" '
18 - git_clone . one &&
18 + git clone . one &&
19 cd one &&
20 echo >file updated by one &&
21 git commit -a -m "updated by one" &&
22 cd .. &&
23 - git_clone . two &&
23 + git clone . two &&
24 cd two &&
25 git repo-config branch.master.remote one &&
26 {
@@ -28,7 +28,7 @@ test_expect_success "clone and setup child repos" '
28 echo "Pull: refs/heads/master:refs/heads/one"
29 } >.git/remotes/one
30 cd .. &&
31 - git_clone . three &&
31 + git clone . three &&
32 cd three &&
33 git repo-config branch.master.remote two &&
34 git repo-config branch.master.merge refs/heads/one &&
@@ -74,7 +74,7 @@ test_expect_success 'fetch following tags' '
74
75 mkdir four &&
76 cd four &&
77 - git_init_db &&
77 + git init-db &&
78
79 git fetch .. :track &&
80 git show-ref --verify refs/tags/anno &&
t/t5520-pull.sh
+1 -1
@@ -17,7 +17,7 @@ test_expect_success setup '
17 test_expect_success 'pulling into void' '
18 mkdir cloned &&
19 cd cloned &&
20 - git_init_db &&
20 + git init-db &&
21 git pull ..
22 '
23
t/t5600-clone-fail-cleanup.sh
+3 -3
@@ -13,7 +13,7 @@ remove the directory before attempting a clone again.'
13
14 test_expect_failure \
15 'clone of non-existent source should fail' \
16 - 'git_clone foo bar'
16 + 'git-clone foo bar'
17
18 test_expect_failure \
19 'failed clone should not leave a directory' \
@@ -29,11 +29,11 @@ test_create_repo foo
29 # current path not to the target dir
30 test_expect_failure \
31 'clone of non-existent (relative to $PWD) source should fail' \
32 - 'git_clone ../foo baz'
32 + 'git-clone ../foo baz'
33
34 test_expect_success \
35 'clone should work now that source exists' \
36 - 'git_clone foo bar'
36 + 'git-clone foo bar'
37
38 test_expect_success \
39 'successfull clone must leave the directory' \
t/t5700-clone-reference.sh
+2 -2
@@ -17,7 +17,7 @@ git commit -m initial'
17 cd "$base_dir"
18
19 test_expect_success 'preparing second repository' \
20 -'git_clone A B && cd B &&
20 +'git clone A B && cd B &&
21 echo second > file2 &&
22 git add file2 &&
23 git commit -m addition &&
@@ -27,7 +27,7 @@ git prune'
27 cd "$base_dir"
28
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
32 cd "$base_dir"
33
t/t5710-info-alternate.sh
+7 -7
@@ -34,7 +34,7 @@ git prune'
34 cd "$base_dir"
35
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 echo "foo bar" > file2 &&
39 git add file2 &&
40 git commit -m "next commit" file2 &&
@@ -44,7 +44,7 @@ git prune'
44 cd "$base_dir"
45
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 echo "Goodbye, cruel world" > file3 &&
49 git add file3 &&
50 git commit -m "one more" file3 &&
@@ -54,11 +54,11 @@ git prune'
54 cd "$base_dir"
55
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 cd H &&
63 test_valid_repo'
64
t/t7001-mv.sh
+2 -2
@@ -88,7 +88,7 @@ test_expect_success \
88
89 test_expect_success "Michael Cassar's test case" '
90 rm -fr .git papers partA &&
91 - git_init_db &&
91 + git init-db &&
92 mkdir -p papers/unsorted papers/all-papers partA &&
93 echo a > papers/unsorted/Thesis.pdf &&
94 echo b > partA/outline.txt &&
@@ -109,7 +109,7 @@ rm -fr papers partA path?
109
110 test_expect_success "Sergey Vlasov's test case" '
111 rm -fr .git &&
112 - git_init_db &&
112 + git init-db &&
113 mkdir ab &&
114 date >ab.c &&
115 date >ab/d &&
t/test-lib.sh
-10
@@ -182,16 +182,6 @@ test_create_repo () {
182 cd "$owd"
183 }
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 test_done () {
186 trap - exit
187 case "$test_failure" in