Skip to content

Commit 3c2f5d2

Browse files
john-caigitster
authored andcommitted
t3210-pack-refs: modernize test format
Some tests in t3210-pack-refs.sh used the older four space indent format. Update these to use tabs. Signed-off-by: John Cai <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2799066 commit 3c2f5d2

File tree

1 file changed

+77
-77
lines changed

1 file changed

+77
-77
lines changed

t/t3210-pack-refs.sh

Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -19,101 +19,101 @@ test_expect_success 'enable reflogs' '
1919
git config core.logallrefupdates true
2020
'
2121

22-
test_expect_success \
23-
'prepare a trivial repository' \
24-
'echo Hello > A &&
25-
git update-index --add A &&
26-
git commit -m "Initial commit." &&
27-
HEAD=$(git rev-parse --verify HEAD)'
22+
test_expect_success 'prepare a trivial repository' '
23+
echo Hello > A &&
24+
git update-index --add A &&
25+
git commit -m "Initial commit." &&
26+
HEAD=$(git rev-parse --verify HEAD)
27+
'
2828

2929
SHA1=
3030

31-
test_expect_success \
32-
'see if git show-ref works as expected' \
33-
'git branch a &&
34-
SHA1=$(cat .git/refs/heads/a) &&
35-
echo "$SHA1 refs/heads/a" >expect &&
36-
git show-ref a >result &&
37-
test_cmp expect result'
38-
39-
test_expect_success \
40-
'see if a branch still exists when packed' \
41-
'git branch b &&
42-
git pack-refs --all &&
43-
rm -f .git/refs/heads/b &&
44-
echo "$SHA1 refs/heads/b" >expect &&
45-
git show-ref b >result &&
46-
test_cmp expect result'
31+
test_expect_success 'see if git show-ref works as expected' '
32+
git branch a &&
33+
SHA1=$(cat .git/refs/heads/a) &&
34+
echo "$SHA1 refs/heads/a" >expect &&
35+
git show-ref a >result &&
36+
test_cmp expect result
37+
'
38+
39+
test_expect_success 'see if a branch still exists when packed' '
40+
git branch b &&
41+
git pack-refs --all &&
42+
rm -f .git/refs/heads/b &&
43+
echo "$SHA1 refs/heads/b" >expect &&
44+
git show-ref b >result &&
45+
test_cmp expect result
46+
'
4747

4848
test_expect_success 'git branch c/d should barf if branch c exists' '
49-
git branch c &&
50-
git pack-refs --all &&
51-
rm -f .git/refs/heads/c &&
52-
test_must_fail git branch c/d
49+
git branch c &&
50+
git pack-refs --all &&
51+
rm -f .git/refs/heads/c &&
52+
test_must_fail git branch c/d
5353
'
5454

55-
test_expect_success \
56-
'see if a branch still exists after git pack-refs --prune' \
57-
'git branch e &&
58-
git pack-refs --all --prune &&
59-
echo "$SHA1 refs/heads/e" >expect &&
60-
git show-ref e >result &&
61-
test_cmp expect result'
55+
test_expect_success 'see if a branch still exists after git pack-refs --prune' '
56+
git branch e &&
57+
git pack-refs --all --prune &&
58+
echo "$SHA1 refs/heads/e" >expect &&
59+
git show-ref e >result &&
60+
test_cmp expect result
61+
'
6262

6363
test_expect_success 'see if git pack-refs --prune remove ref files' '
64-
git branch f &&
65-
git pack-refs --all --prune &&
66-
! test -f .git/refs/heads/f
64+
git branch f &&
65+
git pack-refs --all --prune &&
66+
! test -f .git/refs/heads/f
6767
'
6868

6969
test_expect_success 'see if git pack-refs --prune removes empty dirs' '
70-
git branch r/s/t &&
71-
git pack-refs --all --prune &&
72-
! test -e .git/refs/heads/r
70+
git branch r/s/t &&
71+
git pack-refs --all --prune &&
72+
! test -e .git/refs/heads/r
7373
'
7474

75-
test_expect_success \
76-
'git branch g should work when git branch g/h has been deleted' \
77-
'git branch g/h &&
78-
git pack-refs --all --prune &&
79-
git branch -d g/h &&
80-
git branch g &&
81-
git pack-refs --all &&
82-
git branch -d g'
75+
test_expect_success 'git branch g should work when git branch g/h has been deleted' '
76+
git branch g/h &&
77+
git pack-refs --all --prune &&
78+
git branch -d g/h &&
79+
git branch g &&
80+
git pack-refs --all &&
81+
git branch -d g
82+
'
8383

8484
test_expect_success 'git branch i/j/k should barf if branch i exists' '
85-
git branch i &&
86-
git pack-refs --all --prune &&
87-
test_must_fail git branch i/j/k
85+
git branch i &&
86+
git pack-refs --all --prune &&
87+
test_must_fail git branch i/j/k
88+
'
89+
90+
test_expect_success 'test git branch k after branch k/l/m and k/lm have been deleted' '
91+
git branch k/l &&
92+
git branch k/lm &&
93+
git branch -d k/l &&
94+
git branch k/l/m &&
95+
git branch -d k/l/m &&
96+
git branch -d k/lm &&
97+
git branch k
8898
'
8999

90-
test_expect_success \
91-
'test git branch k after branch k/l/m and k/lm have been deleted' \
92-
'git branch k/l &&
93-
git branch k/lm &&
94-
git branch -d k/l &&
95-
git branch k/l/m &&
96-
git branch -d k/l/m &&
97-
git branch -d k/lm &&
98-
git branch k'
99-
100-
test_expect_success \
101-
'test git branch n after some branch deletion and pruning' \
102-
'git branch n/o &&
103-
git branch n/op &&
104-
git branch -d n/o &&
105-
git branch n/o/p &&
106-
git branch -d n/op &&
107-
git pack-refs --all --prune &&
108-
git branch -d n/o/p &&
109-
git branch n'
110-
111-
test_expect_success \
112-
'see if up-to-date packed refs are preserved' \
113-
'git branch q &&
114-
git pack-refs --all --prune &&
115-
git update-ref refs/heads/q refs/heads/q &&
116-
! test -f .git/refs/heads/q'
100+
test_expect_success 'test git branch n after some branch deletion and pruning' '
101+
git branch n/o &&
102+
git branch n/op &&
103+
git branch -d n/o &&
104+
git branch n/o/p &&
105+
git branch -d n/op &&
106+
git pack-refs --all --prune &&
107+
git branch -d n/o/p &&
108+
git branch n
109+
'
110+
111+
test_expect_success 'see if up-to-date packed refs are preserved' '
112+
git branch q &&
113+
git pack-refs --all --prune &&
114+
git update-ref refs/heads/q refs/heads/q &&
115+
! test -f .git/refs/heads/q
116+
'
117117

118118
test_expect_success 'pack, prune and repack' '
119119
git tag foo &&

0 commit comments

Comments
 (0)