Files
orca/mobile/src/source-control/mobile-branch-entry-format.ts
T
2026-06-08 17:41:27 -07:00

13 lines
438 B
TypeScript

import type { MobileGitBranchChangeEntry } from './mobile-branch-compare'
export function formatMobileBranchEntryMeta(entry: MobileGitBranchChangeEntry): string | null {
const stats =
entry.added !== undefined || entry.removed !== undefined
? `+${entry.added ?? 0} -${entry.removed ?? 0}`
: null
if (entry.oldPath) {
return stats ? `from ${entry.oldPath}; ${stats}` : `from ${entry.oldPath}`
}
return stats
}