(status: GitStatus)
| 342 | } |
| 343 | |
| 344 | function formatDiffStats(status: GitStatus): string | null { |
| 345 | const parts: string[] = []; |
| 346 | if (status.diffAdded > 0) parts.push(`+${String(status.diffAdded)}`); |
| 347 | if (status.diffDeleted > 0) parts.push(`-${String(status.diffDeleted)}`); |
| 348 | if (parts.length > 0) return parts.join(' '); |
| 349 | return status.dirty ? '±' : null; |
| 350 | } |
| 351 | |
| 352 | function toTerminalHyperlink(text: string, url: string): string { |
| 353 | if (!isSafeHttpUrl(url)) return text; |
no test coverage detected