Skip to content

Commit 75389e2

Browse files
committed
t9210: do not rely on lazy fetching to fail
With "rev-list --missing=print $start", where "$start" is a 40-hex object name, the object may or may not be lazily fetched from the promisor. Make sure it fails by forcing dereference of "$start" at that point. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5216f8f commit 75389e2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

t/t9210-scalar.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,14 @@ test_expect_success 'scalar clone' '
154154
test_cmp expect actual &&
155155
156156
test_path_is_missing 1/2 &&
157-
test_must_fail git rev-list --missing=print $second &&
157+
158+
# This relies on the fact that the presence of "--missing"
159+
# on the command line forces lazy fetching off before
160+
# "$second^{blob}" gets parsed. Without "^{blob}", a
161+
# bare object name "$second" is taken into the queue and
162+
# the command may not fail with a fixed "rev-list --missing".
163+
test_must_fail git rev-list --missing=print "$second^{blob}" -- &&
164+
158165
git rev-list $second &&
159166
git cat-file blob $second >actual &&
160167
echo "second" >expect &&

0 commit comments

Comments
 (0)