allow verbose diff in rebase commit editor#2599
Closed
scallaway wants to merge 1 commit intojesseduffield:masterfrom
Closed
allow verbose diff in rebase commit editor#2599scallaway wants to merge 1 commit intojesseduffield:masterfrom
scallaway wants to merge 1 commit intojesseduffield:masterfrom
Conversation
Contributor
Uffizzi Ephemeral Environment
|
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.
bab81c5 to
7fd664a
Compare
Collaborator
|
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 |
Owner
|
I agree: I think we should just remove the option and depend on the git config |
Contributor
Author
|
Happy to do that in this PR, just need to find a spare few minutes to get it updated! |
Contributor
Author
|
Going to close this PR and open one that better reflects the result of the discussion in this PR! |
scallaway
pushed a commit
to scallaway/lazygit
that referenced
this pull request
May 23, 2023
As discussed in jesseduffield#2599, it makes more sense to have the user specify whether they want verbose commits from their own git config, rather than lazygit config. This means that we can remove all the code (including test coverage) associated with the custom verbose flag, and lazygit will just inherit the .gitconfig settings automatically.
stefanhaller
pushed a commit
to scallaway/lazygit
that referenced
this pull request
Jul 14, 2023
As discussed in jesseduffield#2599, it makes more sense to have the user specify whether they want verbose commits from their own git config, rather than lazygit config. This means that we can remove all the code (including test coverage) associated with the custom verbose flag, and lazygit will just inherit the .gitconfig settings automatically.
stefanhaller
added a commit
that referenced
this pull request
Jul 14, 2023
As discussed in #2599, it makes more sense to have the user specify whether they want verbose commits from their own git config, rather than lazygit config. This means that we can remove all the code (including test coverage) associated with the custom verbose flag, and lazygit will just inherit the .gitconfig settings automatically. --- Tested visually locally, as well as running the tests that all pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 fromCommitCommandsintoLocalCommitsControlleras there was no relation between the two (and it's a very useful convenience method). This also means that it can be used inRebaseCommandsdue to their relationship.