gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Use `git commit --verbose` when opening the external editor on a commit message

Open lljbash opened this issue 8 months ago • 2 comments

Describe the solution you'd like Opening the external editor is actually not done by git commit command, so we may need to manually put the diff into the created COMMIT_EDITMSG file.

https://github.com/gitui-org/gitui/blob/e08d954573f2da5d66ace2822f439ee0b97ade34/src/popups/commit.rs#L160-L187

Describe alternatives you've considered Or horner commit.verbose configuration variable. (#900)

Additional context It would be useful to have a full diff in context when I edit commit messages in an external editor. This would allow me to benefit from completions and copilot, etc.

lljbash avatar Apr 17 '25 08:04 lljbash

Still happy to take a PR that adds the diff into the commit template

extrawurst avatar Apr 17 '25 19:04 extrawurst

Still happy to take a PR that adds the diff into the commit template

I'm working on a PR for this. Just want to check: is it acceptable to call external git commands, or should everything be implemented purely in Rust?

lljbash avatar May 09 '25 12:05 lljbash