OverviewFilesCommitsIssuesDocsReleasesPeers

pear-git commits / 6de0da4

Revert --filter=blob:none for federation sync — mirrors need full objects
Federation mirrors must have all git objects to serve git-upload-pack to clients. Partial clone filter left bare repos without blobs, causing "lazy fetching disabled; could not fetch from promisor remote" errors when clients tried to fetch from the mirror. --filter=blob:none is correct for pgh app install (client-side sparse checkout), but NOT for federation sync (server-side full mirror). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6de0da4a23ec894d2f0d7ec84a2b1444b0bb4690
by plankatron <fleeky@gmail.com> · 2026-04-07T17:08:26.000Z

Changed files (2) +4 -6

lib/p2p/sync/git-sync-client-manager.js +3 -5
……@@ -319,12 +319,10 @@ export class GitSyncClientManager {
319319
320320 await new Promise((resolve, reject) => {
321321 let done = false
322 // Use --filter=blob:none for large repos — fetches only tree metadata
323 // and refs, not blob content. Federation mirrors don't need blobs;
324 // clients fetch blobs on demand via sparse checkout.
325 // This reduces transfer from 1+ GB to ~10 MB for large repos.
322 // Full fetch — federation mirrors need all objects to serve clients.
323 // Large transfers may take minutes but won't be killed (no hard timeout).
326324 const child = spawn('git', [
327 '-C', repoPath, 'fetch', '--progress', '--filter=blob:none',
325 '-C', repoPath, 'fetch', '--progress',
328326 fetchUrl, 'refs/*:refs/*', '--no-tags'
329327 ], { detached: true })
330328
pear-git-server.js +1 -1
……@@ -349,7 +349,7 @@ class PearGitServer {
349349 const fetchUrl = `punch://${op.serverKey}/${op.repoName}`
350350 try {
351351 const child = subprocess.spawn('git', [
352 '-C', repoPath, 'fetch', '--filter=blob:none', fetchUrl, `${op.ref}:${op.ref}`
352 '-C', repoPath, 'fetch', fetchUrl, `${op.ref}:${op.ref}`
353353 ], { stdio: ['ignore', 'pipe', 'pipe'] })
354354 const result = await new Promise((resolve) => {
355355 let stderr = ''