This PR patches an issue where the git hook overrides existing commit messages with the AI generated one.
The proposed patch involves checking the ./.git/COMMIT_EDITMSG before we continue to the generation logic. If the file is empty we infer that there is no existing commit message and the other way around
Description
This PR patches an issue where the git hook overrides existing commit messages with the AI generated one.
The proposed patch involves checking the
./.git/COMMIT_EDITMSG
before we continue to the generation logic. If the file is empty we infer that there is no existing commit message and the other way aroundTest Plan
Build and install to obtain the latest changes
Attempt a commit with an empty message, and expect our AI-generated commit to show up in the editor
Attempt a commit with a message, and expect to continue the commit with that manually typed message