Fix git log format — pipe in --format broken by remote shell, use space

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-14 09:14:55 +00:00
parent 66355bd698
commit e66164cdb7

View file

@ -145,13 +145,15 @@ async function refreshStatus(repo) {
}
const [currentRaw, latest] = await Promise.all([
sshGet(target.host, ['git', '-C', target.path, 'log', '-1', '--format=%H|%cI', 'HEAD']),
sshGet(target.host, ['git', '-C', target.path, 'log', '-1', '--format=%H %cI', 'HEAD']),
getForgejoCommit(repo),
])
let currentSha = null, currentTimestamp = null
if (currentRaw && currentRaw.includes('|')) {
;[currentSha, currentTimestamp] = currentRaw.split('|')
if (currentRaw && currentRaw.includes(' ')) {
const sp = currentRaw.indexOf(' ')
currentSha = currentRaw.slice(0, sp)
currentTimestamp = currentRaw.slice(sp + 1)
}
const deployed = !!currentSha
const entry = {