Skip to content

Comments

Add sign-off feature to git commit#1579

Merged
jesseduffield merged 2 commits intojesseduffield:masterfrom
sagikazarmark:commit-signoff
Dec 25, 2021
Merged

Add sign-off feature to git commit#1579
jesseduffield merged 2 commits intojesseduffield:masterfrom
sagikazarmark:commit-signoff

Conversation

@sagikazarmark
Copy link
Contributor

@sagikazarmark sagikazarmark commented Nov 14, 2021

Enable via configuration:

git:
  commit:
    signOff: true

Resubmission of #1031
Fixes #505

To answer the question that came up previously: no, signing-off does not require password entry.

The implementation in this PR is similar to #1031, but I wonder if it would be better to move the signoff flag directly to GitCommand.CommitCmdStr: it has access to the configuration and the signoff flag should probably always be passed to the git commit command. Let me know what you think and I rework the PR if necessary.

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
@Mephistophiles
Copy link

How about adding parameters to the config for the 'git commit' command, like that commitArgs, commitAmendArgs? It would be useful for me to also forward the -v option at rename the commit.

@jesseduffield
Copy link
Owner

Nice work @sagikazarmark!

@Mephistophiles I think such a change could be orthogonal to this one i.e. if the user has set some boolean flags, we'll add those, but we could also allow passing a string. I prefer the boolean approach for now if only because it makes it easier down the line if we want to start using something like go-git under the hood to run the git commands. But if an issue doesn't already exist for such a feature, feel free to create one :)

@jesseduffield jesseduffield merged commit fdf0d4a into jesseduffield:master Dec 25, 2021
@sagikazarmark sagikazarmark deleted the commit-signoff branch December 25, 2021 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support commit SignOff

3 participants