Pin the partial-clone bulk fetch arguments in the spy test

A file:// origin delivers an explicitly wanted blob with or without the
promisor-style flags, so the real-shape fixture cannot fail on the bug that
GitHub triggers. The spy test already records the bulk fetch line; assert
it carries fetch.negotiationAlgorithm=noop, --recurse-submodules=no and
--filter=blob:none. Fails on the current arguments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-29 21:12:06 +02:00
commit f9cebb33d0

View file

@ -10554,6 +10554,24 @@ Content-Le".to_vec()), |_| {}),
bulk_fetches, 1,
"expected exactly one bulk --stdin fetch; invocations:\n{log_text}"
);
// Git's own lazy fetch for a promisor remote sends exactly these; a
// hosted origin (GitHub) omits an explicitly wanted blob, and Git's
// connectivity check then fails, without them. A file:// origin
// delivers the blob either way, so only the arguments can pin this.
let bulk_line = log_text
.lines()
.find(|line| line.contains("fetch") && line.contains("--stdin"))
.unwrap_or_default();
for required in [
"fetch.negotiationAlgorithm=noop",
"--recurse-submodules=no",
"--filter=blob:none",
] {
assert!(
bulk_line.contains(required),
"bulk fetch lacks {required}: {bulk_line}"
);
}
Ok(())
}