( worktreePath: string, untracked: ChangedFile[], )
| 242 | const MAX_LINE_COUNT_SIZE = 1 * 1024 * 1024; |
| 243 | |
| 244 | async function applyUntrackedLineCount( |
| 245 | worktreePath: string, |
| 246 | untracked: ChangedFile[], |
| 247 | ): Promise<void> { |
| 248 | for (const file of untracked) { |
| 249 | try { |
| 250 | const stats = await secureFs.stat(worktreePath, file.path); |
| 251 | if (stats.size > MAX_LINE_COUNT_SIZE) continue; |
| 252 | |
| 253 | const content = await secureFs.readFile(worktreePath, file.path); |
| 254 | const lineCount = content.split("\n").length; |
| 255 | file.additions = lineCount; |
| 256 | file.deletions = 0; |
| 257 | } catch { |
| 258 | // Skip files that fail validation or reading |
| 259 | } |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | interface TrackingStatus { |
| 264 | pushCount: number; |
no outgoing calls
no test coverage detected