fix: address kiloconnect review comments on commit message generation

- Use trimEnd() instead of trim() in git() to preserve leading whitespace
  in porcelain output (fixes status parsing for ' M file' lines)
- Remove unused 'untracked' from FileChange status union
- Use repository.rootUri.fsPath instead of workspaceFolders[0]
- Add explicit null-check for client after try/catch
- Fix test mocks: add isActive/activate, use mockImplementation to throw,
  fix expected error message to match production code
This commit is contained in:
Mark IJbema
2026-02-19 12:40:18 +01:00
parent 9faf4c3934
commit bc27d8924b
4 changed files with 25 additions and 13 deletions
@@ -134,7 +134,7 @@ function git(args: string[], cwd: string): string {
stdout: "pipe",
stderr: "pipe",
})
return result.stdout.toString().trim()
return result.stdout.toString().trimEnd()
}
function parseNameStatus(output: string): Array<{ status: string; path: string }> {