OverviewFilesCommitsIssuesDocsReleasesPeers

pear-git commits / 260ddd0

Respect .pear-git-ignore in sync manifests and fix MetadataBase del key
- _buildManifest in both git-sync-manager and git-sync-client-manager now skips repos with .pear-git-ignore marker - Fix MetadataBase.del() call in delete handler to use correct key format - Without manifest fix, ignored repos were still broadcast to federation peers and re-synced on every connection Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
260ddd0b6868bc24ec3fdaad62e62c6bcc42b7a5
by plankatron <fleeky@gmail.com> · 2026-04-09T12:06:15.000Z

Changed files (3) +11 -3

lib/p2p/sync/git-sync-client-manager.js +5 -1
……@@ -282,9 +282,13 @@ export class GitSyncClientManager {
282282 const entries = await fs.promises.readdir(this.reposDir)
283283 for (const entry of entries) {
284284 if (!entry.endsWith('.git')) continue
285 const repoPath = path.join(this.reposDir, entry)
286 // Skip repos with .pear-git-ignore marker
287 const ignored = await fs.promises.stat(path.join(repoPath, '.pear-git-ignore')).catch(() => null)
288 if (ignored) continue
285289 const repoName = entry.replace(/\.git$/, '')
286290 try {
287 const refs = await this._readRefs(path.join(this.reposDir, entry))
291 const refs = await this._readRefs(repoPath)
288292 const hashRefs = {}
289293 for (const [ref, val] of Object.entries(refs)) {
290294 if (ref === 'HEAD') continue
lib/p2p/sync/git-sync-manager.js +5 -1
……@@ -279,9 +279,13 @@ export class GitSyncManager {
279279 const entries = await fs.promises.readdir(this.reposDir)
280280 for (const entry of entries) {
281281 if (!entry.endsWith('.git')) continue
282 const repoPath = path.join(this.reposDir, entry)
283 // Skip repos with .pear-git-ignore marker
284 const ignored = await fs.promises.stat(path.join(repoPath, '.pear-git-ignore')).catch(() => null)
285 if (ignored) continue
282286 const repoName = entry.replace(/\.git$/, '')
283287 try {
284 const refs = await this._readRefs(path.join(this.reposDir, entry))
288 const refs = await this._readRefs(repoPath)
285289 const hashRefs = {}
286290 for (const [ref, val] of Object.entries(refs)) {
287291 if (ref === 'HEAD') continue
lib/routes/admin-api.js +1 -1
……@@ -955,7 +955,7 @@ async function handleDeleteRepo(req, res, server) {
955955 // Remove from MetadataBase (prevents federation peers from re-creating it)
956956 if (server.metadataBase) {
957957 try {
958 await server.metadataBase.del('repo', repoName)
958 await server.metadataBase.del(`repo:${repoName}`)
959959 } catch (err) {
960960 // Ignore — may not exist
961961 }