3 Commits

Author SHA1 Message Date
Kazuki Yamada
ea1cc485c2 chore(config): disable organizeImports for src/index.ts
Added override configuration to disable Biome's organizeImports feature
specifically for src/index.ts to allow manual import order management
while keeping automatic import organization enabled for other files.
2025-09-21 13:54:12 +09:00
Kazuki Yamada
1175bfb822 refactor(security): Extract duplicate warning logic into helper function
Extract logSuspiciousContentWarning helper function to eliminate code duplication
between Git diffs and Git logs security warning logic in validateFileSafety.ts.

This addresses PR feedback about duplicate code patterns and improves maintainability
by following DRY principles.
2025-08-23 13:30:19 +09:00
Kazuki Yamada
96da6c6045 fix(git): Resolve null character handling in git log command execution
Address Node.js execFileAsync limitation where null bytes in command arguments
cause execution to fail. Implement proper separation between Git format strings
and JavaScript parsing logic.

Changes:
- Separate Git format separator (%x00) from JavaScript parsing separator (\x00)
- Add GIT_LOG_FORMAT_SEPARATOR constant for Git command formatting
- Maintain GIT_LOG_RECORD_SEPARATOR for JavaScript string parsing
- Add comprehensive test coverage for git log functionality
- Support cross-platform line endings (CRLF/LF) in git log parsing
- Add gitLogHandle.test.ts with 13 test cases covering various scenarios

This resolves the "string without null bytes" error while maintaining
flexibility for custom separators and ensuring robust git log processing
across different platforms and git configurations.
2025-08-23 12:53:12 +09:00