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>
Jeff King committed
Sep 5, 2016 at 17:52 UTC
1962d9fbe3feeb888053d0c648e39b82870c4ef3
1 file changed
+2
-2
t/t5305-include-tag.sh
+2
-2
@@ -25,7 +25,6 @@ test_expect_success setup '
25
} >obj-list
26
'
27
28
-rm -rf clone.git
28
test_expect_success 'pack without --include-tag' '
29
packname_1=$(git pack-objects \
30
--window=0 \
@@ -33,6 +32,7 @@ test_expect_success 'pack without --include-tag' '
32
'
33
34
test_expect_success 'unpack objects' '
35
+ rm -rf clone.git &&
36
(
37
GIT_DIR=clone.git &&
38
export GIT_DIR &&
@@ -51,7 +51,6 @@ test_expect_success 'check unpacked result (have commit, no tag)' '
51
test_cmp list.expect list.actual
52
'
53
54
-rm -rf clone.git
54
test_expect_success 'pack with --include-tag' '
55
packname_1=$(git pack-objects \
56
--window=0 \
@@ -60,6 +59,7 @@ test_expect_success 'pack with --include-tag' '
59
'
60
61
test_expect_success 'unpack objects' '
62
+ rm -rf clone.git &&
63
(
64
GIT_DIR=clone.git &&
65
export GIT_DIR &&