diff --git a/src/cli/commands/sync.ts b/src/cli/commands/sync.ts index 6e9c2da..9281dc9 100644 --- a/src/cli/commands/sync.ts +++ b/src/cli/commands/sync.ts @@ -61,12 +61,13 @@ export async function historyApp(name?: string) { const suffix = entry.current ? ` ${color.green('(current)')}` : '' console.log(`${label} ${color.gray(date)}${suffix}`) - const hasChanges = entry.added.length > 0 || entry.modified.length > 0 || entry.deleted.length > 0 || entry.renamed.length > 0 + const renamed = entry.renamed ?? [] + const hasChanges = entry.added.length > 0 || entry.modified.length > 0 || entry.deleted.length > 0 || renamed.length > 0 if (!hasChanges) { console.log(color.gray(' No changes')) } - for (const rename of entry.renamed) { + for (const rename of renamed) { console.log(` ${color.cyan('→')} ${rename}`) } for (const file of entry.added) {