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 <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

John Cai committed May 18, 2023 at 20:03 UTC 3c2f5d26c0d953c5c63557a5c97cddc528d62a55
1 file changed +77 -77
t/t3210-pack-refs.sh
+77 -77
@@ -19,101 +19,101 @@ test_expect_success 'enable reflogs' '
19 git config core.logallrefupdates true
20 '
21
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 +'
28
29 SHA1=
30
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 +'
47
48 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
53 '
54
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 +'
62
63 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
67 '
68
69 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
73 '
74
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 +'
83
84 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
98 '
99
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 +'
117
118 test_expect_success 'pack, prune and repack' '
119 git tag foo &&