diff --git a/docs/config.md b/docs/config.md index 9d6463f842..aa032d046a 100644 --- a/docs/config.md +++ b/docs/config.md @@ -1027,6 +1027,20 @@ as follows: backends.ssh.allowed-signers = "/path/to/allowed-signers" ``` +## Commit Signature Verification + +By default signature verification and display is **disabled** as it incurs a +performance cost when rendering medium to large change logs. + +If you want to verify and display commit signatures, you can use the +provided template functions. + +FIXME(pylbrecht): add example for using CryptographicSignature type + +See [CryptographicSignature Type](./templates.md#cryptographicsignature-type) +for available template methods. + + ## Git settings ### Default remotes for `jj git fetch` and `jj git push` diff --git a/docs/templates.md b/docs/templates.md index 67691ce7c1..f395716a57 100644 --- a/docs/templates.md +++ b/docs/templates.md @@ -93,6 +93,7 @@ This type cannot be printed. The following methods are defined. * `parents() -> List` * `author() -> Signature` * `committer() -> Signature` +* `signature() -> Option` * `mine() -> Boolean`: Commits where the author's email matches the email of the current user. * `working_copies() -> String`: For multi-workspace repository, indicate @@ -129,6 +130,16 @@ The following methods are defined. * `.short([len: Integer]) -> String` * `.shortest([min_len: Integer]) -> ShortestIdPrefix`: Shortest unique prefix. +### CryptographicSignature type + +The following methods are defined. + +FIXME(pylbrecht): add descriptions to methods + +* `.verify() -> String` +* `.key() -> String` +* `.display() -> String` + ### Email type The following methods are defined.