Skip to content

Conversation

@sestrella
Copy link
Owner

@sestrella sestrella commented Dec 17, 2025

No description provided.

This commit extracts the logic for parsing git diff statistics into a separate helper function `parseDiffStats`. This improves code readability and maintainability.

Additionally, a new helper function `parseInt` is introduced to handle the conversion of string numbers to integers with regex matching, further simplifying the parsing process.

A new test file `internal/git/root_test.go` is added to cover the `parseDiffStats` function with various test cases, ensuring its correctness.
---
{"auto-commit-msg":{"language":"rust","version":"0.4.0-dev","model":"gemini-2.5-flash-lite","response_time":1.37,"execution_time":1.41}}
---
{"auto-commit-msg":{"language":"rust","version":"0.4.0-dev","model":"gemini-2.5-flash-lite","response_time":0.82,"execution_time":0.85}}
---
{"auto-commit-msg":{"language":"rust","version":"0.4.0-dev","model":"gemini-2.5-flash-lite","response_time":0.99,"execution_time":1.01}}
@sestrella sestrella merged commit f44f8b4 into main Dec 17, 2025
5 checks passed
@sestrella sestrella deleted the fix_diff_stats_parsing branch December 17, 2025 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants