Skip to content

Commit 31d33c1

Browse files
sign: add signature verification docs
Co-authored-by: julienvincent <[email protected]>
1 parent bbf99ab commit 31d33c1

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

docs/config.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,20 @@ as follows:
10271027
backends.ssh.allowed-signers = "/path/to/allowed-signers"
10281028
```
10291029

1030+
## Commit Signature Verification
1031+
1032+
By default signature verification and display is **disabled** as it incurs a
1033+
performance cost when rendering medium to large change logs.
1034+
1035+
If you want to verify and display commit signatures, you can use the
1036+
provided template functions.
1037+
1038+
FIXME(pylbrecht): add example for using CryptographicSignature type
1039+
1040+
See [CryptographicSignature Type](./templates.md#cryptographicsignature-type)
1041+
for available template methods.
1042+
1043+
10301044
## Git settings
10311045

10321046
### Default remotes for `jj git fetch` and `jj git push`

docs/templates.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ This type cannot be printed. The following methods are defined.
9393
* `parents() -> List<Commit>`
9494
* `author() -> Signature`
9595
* `committer() -> Signature`
96+
* `signature() -> Option<CryptographicSignature>`
9697
* `mine() -> Boolean`: Commits where the author's email matches the email of the current
9798
user.
9899
* `working_copies() -> String`: For multi-workspace repository, indicate
@@ -129,6 +130,16 @@ The following methods are defined.
129130
* `.short([len: Integer]) -> String`
130131
* `.shortest([min_len: Integer]) -> ShortestIdPrefix`: Shortest unique prefix.
131132

133+
### CryptographicSignature type
134+
135+
The following methods are defined.
136+
137+
FIXME(pylbrecht): add descriptions to methods
138+
139+
* `.verify() -> String`
140+
* `.key() -> String`
141+
* `.display() -> String`
142+
132143
### Email type
133144

134145
The following methods are defined.

0 commit comments

Comments
 (0)