Skip to content

Commit b31d45b

Browse files
ttaylorrgitster
authored andcommitted
t/t6501-freshen-objects.sh: prepare for gc --cruft by default
In a similar spirit as previous commits, prepare for `gc --cruft` becoming the default by ensuring that the tests in t6501 explicitly cover the case of freshening loose objects not using cruft packs. We could run this test twice, once with `--cruft` and once with `--no-cruft`, but doing so is unnecessary, since we already test object rescuing, freshening, and dealing with corrupt parts of the unreachable object graph extensively via t5329. Signed-off-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b934207 commit b31d45b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

t/t6501-freshen-objects.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ do
101101
'
102102

103103
test_expect_success "simultaneous gc ($title)" '
104-
git gc --prune=12.hours.ago
104+
git gc --no-cruft --prune=12.hours.ago
105105
'
106106

107107
test_expect_success "finish writing out commit ($title)" '
@@ -131,7 +131,7 @@ do
131131
'
132132

133133
test_expect_success "simultaneous gc ($title)" '
134-
git gc --prune=12.hours.ago
134+
git gc --no-cruft --prune=12.hours.ago
135135
'
136136

137137
# tree should have been refreshed by write-tree
@@ -151,7 +151,7 @@ test_expect_success 'do not complain about existing broken links (commit)' '
151151
some message
152152
EOF
153153
commit=$(git hash-object -t commit -w broken-commit) &&
154-
git gc -q 2>stderr &&
154+
git gc --no-cruft -q 2>stderr &&
155155
verbose git cat-file -e $commit &&
156156
test_must_be_empty stderr
157157
'
@@ -161,7 +161,7 @@ test_expect_success 'do not complain about existing broken links (tree)' '
161161
100644 blob $(test_oid 003) foo
162162
EOF
163163
tree=$(git mktree --missing <broken-tree) &&
164-
git gc -q 2>stderr &&
164+
git gc --no-cruft -q 2>stderr &&
165165
git cat-file -e $tree &&
166166
test_must_be_empty stderr
167167
'
@@ -176,7 +176,7 @@ test_expect_success 'do not complain about existing broken links (tag)' '
176176
this is a broken tag
177177
EOF
178178
tag=$(git hash-object -t tag -w broken-tag) &&
179-
git gc -q 2>stderr &&
179+
git gc --no-cruft -q 2>stderr &&
180180
git cat-file -e $tag &&
181181
test_must_be_empty stderr
182182
'

0 commit comments

Comments
 (0)