Skip to content

Commit 1962d9f

Browse files
peffgitster
authored andcommitted
t5305: move cleanup into test block
We usually try to avoid doing any significant actions outside of test blocks. Although "rm -rf" is unlikely to either fail or to generate output, moving these to the point of use makes it more clear that they are part of the overall setup of "clone.git". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent e0c1cea commit 1962d9f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

t/t5305-include-tag.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ test_expect_success setup '
2525
} >obj-list
2626
'
2727

28-
rm -rf clone.git
2928
test_expect_success 'pack without --include-tag' '
3029
packname_1=$(git pack-objects \
3130
--window=0 \
3231
test-1 <obj-list)
3332
'
3433

3534
test_expect_success 'unpack objects' '
35+
rm -rf clone.git &&
3636
(
3737
GIT_DIR=clone.git &&
3838
export GIT_DIR &&
@@ -51,7 +51,6 @@ test_expect_success 'check unpacked result (have commit, no tag)' '
5151
test_cmp list.expect list.actual
5252
'
5353

54-
rm -rf clone.git
5554
test_expect_success 'pack with --include-tag' '
5655
packname_1=$(git pack-objects \
5756
--window=0 \
@@ -60,6 +59,7 @@ test_expect_success 'pack with --include-tag' '
6059
'
6160

6261
test_expect_success 'unpack objects' '
62+
rm -rf clone.git &&
6363
(
6464
GIT_DIR=clone.git &&
6565
export GIT_DIR &&

0 commit comments

Comments
 (0)