Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hook not work #191

Open
Chindada opened this issue Jul 16, 2024 · 2 comments
Open

hook not work #191

Chindada opened this issue Jul 16, 2024 · 2 comments

Comments

@Chindada
Copy link

version: v0.14.2

To Reproduce

  1. git commit
  2. enter commit message edit vi
  3. enter :q

Describe the bug
It will commit during the vi editor is showing, when i leaving vi, error occurs.

git commit
golangci-lint........................................(no files to check)Skipped
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check that scripts with shebangs are executable..........................Passed
detect private key.......................................................Passed
Summarize the commit message use gpt-4o model
We are trying to summarize a git diff
PromptTokens: 589, CompletionTokens: 15, TotalTokens: 604
We are trying to summarize a title for pull request
PromptTokens: 196, CompletionTokens: 5, TotalTokens: 201
We are trying to get conventional commit prefix (Tools)
PromptTokens: 398, CompletionTokens: 5, TotalTokens: 403
================Commit Summary====================

build: improve system performance and stability

- Change Docker run command to use detached mode (`-d` flag)

==================================================
Write the commit message to .git/COMMIT_EDITMSG file
Git record changes to the repository
[develop dff0b2a] build: improve system performance and stability
 1 file changed, 1 insertion(+), 1 deletion(-)
fatal: cannot lock ref 'HEAD': is at dff0b2a88ce8089b4b24a61b1a4af5a31c8551f2 but expected b8e772c02c69640938447f6b2f8474ddb77fafcc
build: improve system performance and stability

- Change Docker run command to use detached mode (`-d` flag)

Signed-off-by: Tim Hsu@M2MAX-20230327 <[email protected]>
~                                                                                                                                             
~                                                                                                                                             
~                                                                                                                                             
~                                                                                                                                             
~                                                                                                                                             
~                                                                                                                                             
~                                                                                                                                             
~                                                                                                                                             
~                                                                                                                                             
~                                                                                                                                             
~                                                                                                                                             
~                                                                                                                                             
~                                                                                                                                             
~                                                                                                                                             
~                                                                                                                                             
~                                                                                                                                             
~                                                                                                                                             
~                                                                                                                                             
"~/dev_projects/iom/mojave/.git/COMMIT_EDITMSG" 5L, 173B
@appleboy
Copy link
Owner

I will take it.

@alexander-turner
Copy link

I'm having this issue too. Currently I:

  1. Can only accept the commit message (no backing out with q!), and
  2. Can't modify the commit message due to an error like
fatal: cannot lock ref 'HEAD': is at 6555dec73f8f44a0230f1acb3dce034d3572d4fa but expected 4961b3359a9643d1321437d5b124d1607436df9c

amzyang pushed a commit to amzyang/CodeGPT that referenced this issue Oct 26, 2024
amzyang pushed a commit to amzyang/CodeGPT that referenced this issue Dec 15, 2024
amzyang pushed a commit to amzyang/CodeGPT that referenced this issue Jan 30, 2025
amzyang pushed a commit to amzyang/CodeGPT that referenced this issue Feb 2, 2025
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

No branches or pull requests

3 participants