upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tests/ngit_init.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-04-22 13:00:17 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-04-22 13:00:17 +0000
commite98acf8c5da5033b20aee8510485a8b4a4f4a56e (patch)
treee513e9edb9feca3d9c079026002fbe9cd3d0cec9 /tests/ngit_init.rs
parent205ca05897cbc727d9b75e7ab68375b5c93ead39 (diff)
fix: prevent fatal clone/fetch errors when PR git data unavailable
Only advertise `refs/heads/pr/*` branches once their tip OIDs are confirmed present locally; prevents `fatal: bad object` / `remote did not send all necessary objects` errors during clone/fetch when a PR tip lives on a different git server than the one that won the bulk prefetch race. After the bulk prefetch, collect remaining missing PR tip OIDs and do one batch fetch per repo git server using only the OIDs that server has advertised; break early once all are satisfied and skip servers that carry none. Avoids batch-poisoning (a server rejects the whole request if any single OID is absent) and redundant connections. Restrict mop-up fetches and run_fetch to the repo's declared git servers; do not fetch from clone-tag URLs in PR events - they are submitter-supplied and could let a malicious or slow server stall every clone/fetch operation. Also apply rustfmt and fix clippy warnings.
Diffstat (limited to 'tests/ngit_init.rs')
0 files changed, 0 insertions, 0 deletions