OverviewFilesCommitsIssuesDocsReleasesPeers

pear-git commits / 7a177e5

pgh app install update: fetch from local bare repo, not P2P origin
Servers have ~/git-repos/repo.git kept current by federation sync. App install updates should pull from that local repo — instant, no P2P connection, no timeout, no wrong-peer issues. Falls back to P2P origin if no local bare repo exists (thin clients). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7a177e57fc949226c01c26b22d61d3d2224a181f
by plankatron <fleeky@gmail.com> · 2026-04-07T16:32:29.000Z

Changed files (1) +6 -4

lib/cli/commands/app.js +6 -4
……@@ -177,11 +177,13 @@ async function appInstallGit (repoName, flags) {
177177 const oldVersion = pkg.version || 'unknown'
178178
179179 if (existsSync(path.join(installDir, '.git'))) {
180 // Git-cloned install — update via git pull
181 log(name + ' v' + oldVersion + ' already installed, updating...')
180 // Git-cloned install — update from local bare repo (synced via federation)
181 const localBareRepo = path.join(HOME, 'git-repos', repoName + '.git')
182 const fetchSource = existsSync(localBareRepo) ? localBareRepo : 'origin'
183 log(name + ' v' + oldVersion + ' already installed, updating from ' + (fetchSource === 'origin' ? 'P2P origin' : 'local bare repo') + '...')
182184 try {
183 await execGitInDir(installDir, ['fetch', 'origin', 'release', '--depth', '1'])
184 await execGitInDir(installDir, ['reset', '--hard', 'origin/release'])
185 await execGitInDir(installDir, ['fetch', fetchSource, 'release', '--depth', '1'])
186 await execGitInDir(installDir, ['reset', '--hard', 'FETCH_HEAD'])
185187 } catch (err) {
186188 error('Git update failed: ' + err.message)
187189 }