OverviewFilesCommitsIssuesDocsReleasesPeers

pear-git commits / 53a1980

Add progress logging to federation git fetch
Shows git transfer progress (Receiving/Resolving objects) in server logs so sysadmins can see sync status for large repos. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
53a19806819acb1f075931cd66c542355867e1d0
by plankatron <fleeky@gmail.com> · 2026-04-07T16:05:02.000Z

Changed files (1) +10 -2

lib/p2p/sync/git-sync-client-manager.js +10 -2
……@@ -320,7 +320,7 @@ export class GitSyncClientManager {
320320 await new Promise((resolve, reject) => {
321321 let done = false
322322 const child = spawn('git', [
323 '-C', repoPath, 'fetch', fetchUrl,
323 '-C', repoPath, 'fetch', '--progress', fetchUrl,
324324 'refs/*:refs/*', '--no-tags'
325325 ], { detached: true })
326326
……@@ -344,7 +344,15 @@ export class GitSyncClientManager {
344344 })
345345
346346 const stderrBuf = []
347 child.stderr.on('data', (d) => { stderrBuf.push(d.toString()) })
347 child.stderr.on('data', (d) => {
348 const line = d.toString()
349 stderrBuf.push(line)
350 // Log progress lines (Receiving/Resolving) for sysadmin visibility
351 if (line.includes('Receiving') || line.includes('Resolving') || line.includes('remote:')) {
352 const clean = line.replace(/\r/g, '\n').trim()
353 if (clean) console.log(`[GitSync] ${repoName}: ${clean}`)
354 }
355 })
348356 })
349357
350358 // Refresh repo metadata (commits, branches, lastCommit) so the UI stays current