tak-bro / aicommit2

A Reactive CLI that generates git commit messages with Ollama, ChatGPT, Gemini, Claude, Mistral and other AI
https://www.npmjs.com/package/aicommit2
MIT License
142 stars 12 forks source link

Leading blank space in `prepare-commit-msg` hook #79

Closed noamsto closed 1 month ago

noamsto commented 2 months ago

Bug description

I've installed the git hook and ran it, there is a blank line after the comment header and there shouldn't be any. It other hooks to fail (for example using alongside https://github.com/ljnsn/cz-conventional-gitmoji) image

image If I manually remove the leading new line the later hook works.

aicommit2 version

v10.2.4

Environment

System:
    OS: Linux 6.10 NixOS 24.11 (Vicuna) 24.11 (Vicuna)
    CPU: (16) x64 AMD Ryzen 7 PRO 8840HS w/ Radeon 780M Graphics
    Memory: 51.39 GB / 58.51 GB
    Container: Yes
    Shell: 5.9 - /run/current-system/sw/bin/zsh
  Binaries:
    Node: 20.11.1 - /nix/store/wcg03hp9av1pgr3mj5m3dbanmz8jqq69-nodejs-slim-20.11.1/bin/node
    npm: 10.2.4 - /nix/store/frchj7ynjnj5rwbhhdkwig25lz41y854-nodejs-20.11.1/bin/npm

Can you contribute a fix?

tak-bro commented 2 months ago

Thank you! Your code has been applied. Please use version v2.1.1.