Skip to content

Commit

Permalink
sign: add signature verification docs
Browse files Browse the repository at this point in the history
Co-authored-by: julienvincent <[email protected]>
  • Loading branch information
pylbrecht and julienvincent committed Dec 29, 2024
1 parent bbf99ab commit 31d33c1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
11 changes: 11 additions & 0 deletions docs/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ This type cannot be printed. The following methods are defined.
* `parents() -> List<Commit>`
* `author() -> Signature`
* `committer() -> Signature`
* `signature() -> Option<CryptographicSignature>`
* `mine() -> Boolean`: Commits where the author's email matches the email of the current
user.
* `working_copies() -> String`: For multi-workspace repository, indicate
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 31d33c1

Please sign in to comment.