di-sukharev / opencommit

just a GPT wrapper for git — generate commit messages by an LLM in 1 sec — works best with Claude 3.5 — supports local models too
https://www.npmjs.com/package/opencommit
MIT License
6.19k stars 331 forks source link

[Bug]: Git error when use OCO_MESSAGE_TEMPLATE_PLACEHOLDER #278

Closed mdespeuilles closed 9 months ago

mdespeuilles commented 1 year ago

Opencommit Version

3.0.4

Node Version

18.18.2

NPM Version

9.8.1

What OS are you seeing the problem on?

Mac

What happened?

I've configured open commit to use the Message Template Placeholder by default:

OCO_MESSAGE_TEMPLATE_PLACEHOLDER=$msg When I try to launch oco with a custom message :

oco '#111 $msg' I get this error:

└ ✖ Command failed with exit code 1: git commit -m #111 ⬆️ chore(package.json)...... #111 $msg
error: pathspec '#111 $msg' did not match any file(s) known to git

Expected Behavior

Commit messages is generated successfully.

Current Behavior

Git error message :

└ ✖ Command failed with exit code 1: git commit -m #111 ⬆️ chore(package.json)...... #111 $msg
error: pathspec '#111 $msg' did not match any file(s) known to git

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

vifergonza commented 1 year ago

Same error with

Opencommit Version

3.0.4

Node Version

14.21.3

NPM Version

6.14.18

What OS are you seeing the problem on?

Mac

github-actions[bot] commented 11 months ago

Stale issue message

di-sukharev commented 9 months ago

reopening, will take a look at this

di-sukharev commented 9 months ago

update to npm i -g opencommit@latest