OverviewFilesCommitsIssuesDocsReleasesPeers

pear-git commits / 54a0ef7

Auto-register new repos after _initBareRepo
Creating the bare repo isn't enough — it also needs to be registered with the repo registry so it appears in the web UI and API immediately. Without this, manually running pgh repo scan + import was needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
54a0ef7aab77647350f300a10d3c2b3dac28a6b0
by plankatron <fleeky@gmail.com> · 2026-04-07T01:51:59.000Z

Changed files (1) +18 -1

lib/p2p/sync/git-sync-client-manager.js +18 -1
……@@ -445,9 +445,26 @@ export class GitSyncClientManager {
445445 child.on('error', reject)
446446 })
447447
448 // Auto-install post-receive hook for federation sync
448 // Auto-install post-receive hook and register with server
449449 if (this._repoRegistry) {
450450 await this._repoRegistry.ensurePostReceiveHook(repoPath)
451
452 // Register so the repo appears in the web UI and API immediately
453 const repoName = path.basename(repoPath, '.git')
454 await this._repoRegistry.register({
455 name: repoName,
456 path: repoPath,
457 visibility: 'public'
458 })
459 console.log(`[GitSyncClient] Registered ${repoName} with server`)
460
461 // Update in-memory repos list so it's immediately queryable
462 if (this._repos) {
463 const exists = this._repos.find(r => r.name === repoName)
464 if (!exists) {
465 this._repos.push({ name: repoName, path: repoPath, visibility: 'public' })
466 }
467 }
451468 }
452469 }
453470