This commit is contained in:
Chris Wanstrath 2026-02-09 22:35:43 -08:00
parent bffa4236e7
commit 579b082b48

View File

@ -61,12 +61,13 @@ export async function historyApp(name?: string) {
const suffix = entry.current ? ` ${color.green('(current)')}` : '' const suffix = entry.current ? ` ${color.green('(current)')}` : ''
console.log(`${label} ${color.gray(date)}${suffix}`) 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) { if (!hasChanges) {
console.log(color.gray(' No changes')) console.log(color.gray(' No changes'))
} }
for (const rename of entry.renamed) { for (const rename of renamed) {
console.log(` ${color.cyan('→')} ${rename}`) console.log(` ${color.cyan('→')} ${rename}`)
} }
for (const file of entry.added) { for (const file of entry.added) {