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

bug: Continually get unrelated commit messages #150

Open
slacksystem opened this issue Apr 24, 2023 · 2 comments
Open

bug: Continually get unrelated commit messages #150

slacksystem opened this issue Apr 24, 2023 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@slacksystem
Copy link

Describe the bug
When I try to commit, I regularly get a message that is mostly if not entirely unrelated to the changes. It seems to be basing the description more on the sample commit messages in the prompts. Below is an example with a very minor change, renaming the project in a CMakeLists.txt file. See how it added quite a number of irrelevant things, and doesn't address the one minor change in the file.

To Reproduce
Steps to reproduce the behavior:

  1. Install gptcommit in the repo
  2. Change file
  3. Stage Changes
  4. git commit
  5. See unrelated commit message

Expected behavior
The program generates a relevant commit message.

Screenshots

Refactor: Improve reliability of tests and API calls

- Implemented new feature to improve user experience
- Refactored code for better performance and maintainability
- Fixed several bugs related to user authentication

[CMakeLists.txt]
- Refactor code to use new API
- Add new error handling logic
- Update function to accept more parameters
- Replace deprecated function with newer version
### BEGIN GIT COMMIT BEFORE AMEND
# 
# # Please enter the commit message for your changes. Lines starting
# # with '#' will be ignored, and an empty message aborts the commit.
# #
# # On branch main
# # Your branch is ahead of 'origin/main' by 1 commit.
# #   (use "git push" to publish your local commits)
# #
# # Changes to be committed:
# #	modified:   CMakeLists.txt
# #
# # Changes not staged for commit:
# #	modified:   vcpkg-configuration.json
# #
# # ------------------------ >8 ------------------------
# # Do not modify or remove the line above.
# # Everything below it will be ignored.
# diff --git a/CMakeLists.txt b/CMakeLists.txt
# index c50861f..87dcdc2 100644
# --- a/CMakeLists.txt
# +++ b/CMakeLists.txt
# @@ -3,7 +3,7 @@
#  cmake_minimum_required(VERSION 3.21)
#  
#  # Set your project name. This will be the name of your SKSE .dll file.
# -project(HelloWorld VERSION 0.0.1 LANGUAGES CXX)
# +project(HelloWorld_SkScr_YT_Series VERSION 0.0.1 LANGUAGES CXX)
#  
#  # #
#  # YOU DO NOT NEED TO EDIT ANYTHING BELOW HERE
### END GIT COMMIT BEFORE AMEND

System Info (please complete the following information):

  • OS: [e.g. Windows, macOS, linux]
  • Version [e.g. v0.5.1] (Note only the latest 0.x version is supported)

Additional context
Add any other context about the problem here.

@slacksystem slacksystem added the bug Something isn't working label Apr 24, 2023
@slacksystem slacksystem changed the title bug: Continually get wrong diffs bug: Continually get unrelated commit messages Apr 24, 2023
@nickradford
Copy link

Experiencing similar issues, removed a single line print statement in some swift code, the generated commit included

- Remove unnecessary print statement
- adjust ContentView width and height
- Refactor CommandGroup actions
- Add help button in CommandGroup

@zurawiki
Copy link
Owner

I can confirm that this happens on short diffs. We should update the prompt to handle these cases. Open to PRs here

@zurawiki zurawiki added help wanted Extra attention is needed good first issue Good for newcomers labels May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants