Skip to content

Commit 9c8e7e9

Browse files
hanwengitster
authored andcommitted
t5000: reformat indentation to the latest fashion
Signed-off-by: Han-Wen Nienhuys <[email protected]> Reviewed-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0218ad5 commit 9c8e7e9

File tree

1 file changed

+62
-51
lines changed

1 file changed

+62
-51
lines changed

t/t5000-tar-tree.sh

Lines changed: 62 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -111,25 +111,34 @@ test_expect_success 'setup' '
111111
EOF
112112
'
113113

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+
'
133142

134143
test_expect_success \
135144
'add ignored file' \
@@ -147,18 +156,18 @@ test_expect_success 'setup export-subst' '
147156
>a/substfile1
148157
'
149158

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+
'
154163

155-
test_expect_success \
156-
'remove ignored file' \
157-
'rm a/ignored'
164+
test_expect_success 'remove ignored file' '
165+
rm a/ignored
166+
'
158167

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+
'
162171

163172
check_tar b
164173

@@ -194,26 +203,28 @@ check_added with_untracked2 untracked one/untracked
194203
check_added with_untracked2 untracked two/untracked
195204

196205
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
200209
'
201210

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+
'
205214

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+
'
209218

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+
'
213223

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+
'
217228

218229
test_expect_success 'git archive --remote with configured remote' '
219230
git config remote.foo.url . &&
@@ -224,13 +235,13 @@ test_expect_success 'git archive --remote with configured remote' '
224235
test_cmp_bin b.tar b5-nick.tar
225236
'
226237

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+
'
234245

235246
test_expect_success \
236247
'git get-tar-commit-id' \

0 commit comments

Comments
 (0)