This repository was archived by the owner on Nov 15, 2024. It is now read-only.
Commit 03949e3
tests: apply modern idiom for exiting loop upon failure
Rather than maintaining a flag indicating a failure within a loop and
aborting the test when the loop ends if the flag is set, modern practice
is to signal the failure immediately by exiting the loop early via
`return 1` (or `exit 1` if inside a subshell). Simplify these loops by
following the modern idiom.
Signed-off-by: Eric Sunshine <[email protected]>
Reviewed-by: Elijah Newren <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 77b1d9f commit 03949e3
File tree
3 files changed
+12
-25
lines changed- t
3 files changed
+12
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
64 | 61 | | |
65 | | - | |
66 | 62 | | |
67 | 63 | | |
68 | 64 | | |
69 | 65 | | |
70 | 66 | | |
71 | | - | |
72 | | - | |
| 67 | + | |
73 | 68 | | |
74 | | - | |
75 | 69 | | |
76 | 70 | | |
77 | 71 | | |
78 | 72 | | |
79 | 73 | | |
80 | 74 | | |
81 | 75 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
88 | 79 | | |
89 | | - | |
90 | 80 | | |
91 | 81 | | |
92 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1332 | 1332 | | |
1333 | 1333 | | |
1334 | 1334 | | |
1335 | | - | |
1336 | 1335 | | |
1337 | 1336 | | |
1338 | 1337 | | |
| |||
1348 | 1347 | | |
1349 | 1348 | | |
1350 | 1349 | | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
| 1350 | + | |
| 1351 | + | |
1354 | 1352 | | |
1355 | 1353 | | |
1356 | 1354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
| 353 | + | |
354 | 354 | | |
355 | | - | |
356 | | - | |
| 355 | + | |
357 | 356 | | |
358 | 357 | | |
359 | 358 | | |
| |||
0 commit comments