@@ -111,25 +111,34 @@ test_expect_success 'setup' '
111
111
EOF
112
112
'
113
113
114
- test_expect_success \
115
- ' populate workdir' \
116
- ' mkdir a &&
117
- echo simple textfile >a/a &&
118
- ten=0123456789 && hundred=$ten$ten$ten$ten$ten$ten$ten$ten$ten$ten &&
119
- echo long filename >a/four$hundred &&
120
- mkdir a/bin &&
121
- test-tool genrandom "frotz" 500000 >a/bin/sh &&
122
- printf "A\$Format:%s\$O" "$SUBSTFORMAT" >a/substfile1 &&
123
- printf "A not substituted O" >a/substfile2 &&
124
- if test_have_prereq SYMLINKS; then
125
- ln -s a a/l1
126
- else
127
- printf %s a > a/l1
128
- fi &&
129
- (p=long_path_to_a_file && cd a &&
130
- for depth in 1 2 3 4 5; do mkdir $p && cd $p; done &&
131
- echo text >file_with_long_path) &&
132
- (cd a && find .) | sort >a.lst'
114
+ test_expect_success ' populate workdir' '
115
+ mkdir a &&
116
+ echo simple textfile >a/a &&
117
+ ten=0123456789 &&
118
+ hundred="$ten$ten$ten$ten$ten$ten$ten$ten$ten$ten" &&
119
+ echo long filename >"a/four$hundred" &&
120
+ mkdir a/bin &&
121
+ test-tool genrandom "frotz" 500000 >a/bin/sh &&
122
+ printf "A\$Format:%s\$O" "$SUBSTFORMAT" >a/substfile1 &&
123
+ printf "A not substituted O" >a/substfile2 &&
124
+ if test_have_prereq SYMLINKS
125
+ then
126
+ ln -s a a/l1
127
+ else
128
+ printf %s a >a/l1
129
+ fi &&
130
+ (
131
+ p=long_path_to_a_file &&
132
+ cd a &&
133
+ for depth in 1 2 3 4 5
134
+ do
135
+ mkdir $p &&
136
+ cd $p
137
+ done &&
138
+ echo text >file_with_long_path
139
+ ) &&
140
+ (cd a && find .) | sort >a.lst
141
+ '
133
142
134
143
test_expect_success \
135
144
' add ignored file' \
@@ -147,18 +156,18 @@ test_expect_success 'setup export-subst' '
147
156
>a/substfile1
148
157
'
149
158
150
- test_expect_success \
151
- ' create bare clone ' \
152
- ' git clone -- bare . bare. git &&
153
- cp .git/info/attributes bare.git/info/attributes '
159
+ test_expect_success ' create bare clone ' '
160
+ git clone --bare . bare.git &&
161
+ cp . git/info/attributes bare. git/info/attributes
162
+ '
154
163
155
- test_expect_success \
156
- ' remove ignored file ' \
157
- ' rm a/ignored '
164
+ test_expect_success ' remove ignored file ' '
165
+ rm a/ ignored
166
+ '
158
167
159
- test_expect_success \
160
- ' git archive' \
161
- ' git archive HEAD >b.tar '
168
+ test_expect_success ' git archive ' '
169
+ git archive HEAD >b.tar
170
+ '
162
171
163
172
check_tar b
164
173
@@ -194,26 +203,28 @@ check_added with_untracked2 untracked one/untracked
194
203
check_added with_untracked2 untracked two/untracked
195
204
196
205
test_expect_success ' git archive on large files' '
197
- test_config core.bigfilethreshold 1 &&
198
- git archive HEAD >b3.tar &&
199
- test_cmp_bin b.tar b3.tar
206
+ test_config core.bigfilethreshold 1 &&
207
+ git archive HEAD >b3.tar &&
208
+ test_cmp_bin b.tar b3.tar
200
209
'
201
210
202
- test_expect_success \
203
- ' git archive in a bare repo ' \
204
- ' (cd bare.git && git archive HEAD) >b3.tar '
211
+ test_expect_success ' git archive in a bare repo ' '
212
+ git --git-dir bare. git archive HEAD >b3.tar
213
+ '
205
214
206
- test_expect_success \
207
- ' git archive vs. the same in a bare repo ' \
208
- ' test_cmp_bin b.tar b3.tar '
215
+ test_expect_success ' git archive vs. the same in a bare repo ' '
216
+ test_cmp_bin b.tar b3.tar
217
+ '
209
218
210
- test_expect_success ' git archive with --output' \
211
- ' git archive --output=b4.tar HEAD &&
212
- test_cmp_bin b.tar b4.tar'
219
+ test_expect_success ' git archive with --output' '
220
+ git archive --output=b4.tar HEAD &&
221
+ test_cmp_bin b.tar b4.tar
222
+ '
213
223
214
- test_expect_success ' git archive --remote' \
215
- ' git archive --remote=. HEAD >b5.tar &&
216
- test_cmp_bin b.tar b5.tar'
224
+ test_expect_success ' git archive --remote' '
225
+ git archive --remote=. HEAD >b5.tar &&
226
+ test_cmp_bin b.tar b5.tar
227
+ '
217
228
218
229
test_expect_success ' git archive --remote with configured remote' '
219
230
git config remote.foo.url . &&
@@ -224,13 +235,13 @@ test_expect_success 'git archive --remote with configured remote' '
224
235
test_cmp_bin b.tar b5-nick.tar
225
236
'
226
237
227
- test_expect_success \
228
- ' validate file modification time ' \
229
- ' mkdir extract &&
230
- "$TAR" xf b.tar -C extract a/a &&
231
- test-tool chmtime --get extract/a/a >b .mtime &&
232
- echo "1117231200" > expected.mtime &&
233
- test_cmp expected.mtime b.mtime '
238
+ test_expect_success ' validate file modification time ' '
239
+ mkdir extract &&
240
+ "$TAR" xf b.tar -C extract a/a &&
241
+ test-tool chmtime --get extract/ a/a >b.mtime &&
242
+ echo "1117231200" >expected .mtime &&
243
+ test_cmp expected.mtime b.mtime
244
+ '
234
245
235
246
test_expect_success \
236
247
' git get-tar-commit-id' \
0 commit comments