lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

allow verbose diff in rebase commit editor

Open scallaway opened this issue 2 years ago • 3 comments

There currently exists a "verbose" flag in the config that a user can enable in order to show the diff when writing a commit message in the editor of their choice. However, I discovered that this isn't the case when you're rewording an existing commit through a rebase.

I find it's much easier to write meaningful commit messages during a rebase if the diff is right there in front of you, so this commit adds the ability for that verbose flag to affect the rebase commit editing as well.

I thought about adding another flag to the config, but figured that was a bit overkill since this is still to do with commit messages.


I've copied the verboseFlag() method from CommitCommands into LocalCommitsController as there was no relation between the two (and it's a very useful convenience method). This also means that it can be used in RebaseCommands due to their relationship.

scallaway avatar May 04 '23 15:05 scallaway

Uffizzi Ephemeral Environment deployment-24340

:cloud: https://app.uffizzi.com/github.com/jesseduffield/lazygit/pull/2599

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more!

github-actions[bot] avatar May 04 '23 15:05 github-actions[bot]

Thanks for this. I wonder, though, if we should do the opposite and remove the existing "verbose" option for commit; users who want this can turn it on in git's config by saying git config --global commit.verbose true (that's what I do), and it will apply to both commit and reword.

stefanhaller avatar May 04 '23 16:05 stefanhaller

I agree: I think we should just remove the option and depend on the git config

jesseduffield avatar May 05 '23 02:05 jesseduffield

Happy to do that in this PR, just need to find a spare few minutes to get it updated!

scallaway avatar May 17 '23 09:05 scallaway

Going to close this PR and open one that better reflects the result of the discussion in this PR!

scallaway avatar May 23 '23 13:05 scallaway