Crates.io | dco |
lib.rs | dco |
version | 0.1.3 |
source | src |
created_at | 2023-10-15 01:43:41.157971 |
updated_at | 2023-10-15 05:11:51.898149 |
description | A simple tool for adding a DCO Signed-off-by: line to a git commit message |
homepage | https://github.com/zmc/dco |
repository | https://github.com/zmc/dco |
max_upload_size | |
id | 1003390 |
size | 10,622 |
A simple tool for adding a DCO Signed-off-by: line to a git commit message
It takes a commit message on stdin, and spits it out with the DCO line in the right place:
$ cat demo
commit title
message body
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch main
# Changes to be committed:
# modified: README.md
$ dco < demo
commit title
message body
Signed-off-by: User Person <user@localhost>
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch main
# Changes to be committed:
# modified: README.md
cargo install dco
I initially made this for the Helix editor, but there's nothing specific to it. I'd be happy to include configuration blurbs for any editors submitted.
In languages.toml
:
[[language]]
name = "Git"
language-id = "Git"
scope = "source.git"
formatter = { command = "dco" }
file-types = ["COMMIT_EDITMSG"]
roots = [".git"]
While editing a git commit message, type :format