Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRetain commit message after pre-commit hook failure #854
Comments
|
Sounds like we'd need to set a flag to false upon submitting the message and if an error occurs afterwards we set it to true, then next time we open the commit message view we only clear it based on that flag. |
Is your feature request related to a problem? Please describe.
If pre-commit modifies a file, such as code formatting, the lazygit interface reloads, but staging the modified file and committing again requires retyping the commit message.
Specifically this happens with github.com/psf/black plugin, but I guess the issue will apply to any hook that modifies a file and reports a failure.
Describe the solution you'd like
It would be good if the commit message was retained in this scenario - so you can quickly stage the reformatted file
Describe alternatives you've considered
None.
Additional context
This event triggers it: