From 9b5af2608f20ddac78b04cb2cfc0a5698fa72e1c Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Mon, 11 Aug 2025 17:45:45 -0700 Subject: [PATCH] contributing.md: simplify `jj` sign-off instructions Change-Id: tymwovulsrvrwkylomknntvlvxyqpnyy This functionality seems to be available since jj 0.29. Signed-off-by: Ilya Grigoriev --- docs/contributing.md | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index 897298e..adf23ef 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -115,23 +115,16 @@ git commit --amend -s If you're submitting a PR with multiple commits, make sure each one is signed. -For [jj](https://jj-vcs.github.io/jj/latest/) users, you can add this to -your jj config: +For [jj](https://jj-vcs.github.io/jj/latest/) users, you can run the following command +to make it sign off commits in the tangled repo: -``` -ui.should-sign-off = true -``` - -and to your `templates.draft_commit_description`, add the following `if` -block: - -``` - if( - config("ui.should-sign-off").as_boolean() && !description.contains("Signed-off-by: " ++ author.name()), - "\nSigned-off-by: " ++ author.name() ++ " <" ++ author.email() ++ ">", - ), +```shell +# Safety check, should say "No matching config key..." +jj config list templates.commit_trailers +# The command below may need to be adjusted if the command above returned something. +jj config set --repo templates.commit_trailers "format_signed_off_by_trailer(self)" ``` Refer to the [jj -documentation](https://jj-vcs.github.io/jj/latest/config/#default-description) +documentation](https://jj-vcs.github.io/jj/latest/config/#commit-trailers) for more information. -- 2.43.0