-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add signoff flag to revert action #5092
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
base: master
Are you sure you want to change the base?
Conversation
|
Looks good, thanks.
That shouldn't be a big problem; actually, I don't find the helper very useful, we might just as well get rid of it and write ArgIf(self.UserConfig().Git.Commit.SignOff, "--signoff").everywhere. Then you can do the same for merge commits. I agree that merge is probably the only other command that we should add the flag to. (What about cherry-pick though? I'm unsure about the semantics here; what if you are cherry-picking someone else's commit and it already has a signed-off-by header, should it still add yours as well?) |
|
Agreed on the lack of utility from the helper, I have inlined it. I figure that since
which I read to say the final |
👍 (However, please don't make refactorings and behavior changes in the same commit. Also, the commit subject is no longer accurate.)
You have a point; on the other hand, git's (Side note: I find it interesting that of all git commands that take a |
d2d1424 to
acf07e2
Compare
Rewrote git history to have the refactoring separate from the change.
I'd say that most users thought that it already was added as a global option, hence the initial bug report surprised that it wasn't. (I even thought it was under the config key |
PR Description
This PR adds the
--signoffflag togit revertcommands using the standard helper in onCommitCommands.Fixes #4911
There could also be some consideration of adding the signoff flag to other things that still do not have it, like:
Commands that create new commits
Merge commit
lazygit/pkg/commands/git_commands/branch.go
Line 280 in 17d03ec
Creating fixup commit
Commands that edit commands
Amending head:
lazygit/pkg/commands/git_commands/commit.go
Line 235 in 17d03ec
Rewording commit:
lazygit/pkg/commands/git_commands/commit.go
Line 123 in 17d03ec
Author related commands:
lazygit/pkg/commands/git_commands/commit.go
Lines 24 to 55 in 17d03ec
Please check if the PR fulfills these requirements
go generate ./...)