mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-29 23:57:51 +00:00
docs: improve and convert library design diagram to SVG
It was lovingly hand drawn by yours truly in Excalidraw. Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
parent
e6c0692655
commit
a621d8cf3f
2 changed files with 21 additions and 26 deletions
|
@ -46,33 +46,18 @@ the `.jj/repo/store/type` file. There are similar files for the other backends
|
|||
|
||||
### Overview
|
||||
|
||||
Here's a diagram showing some important types in the library crate. The
|
||||
following sections describe each component.
|
||||
Here's a diagram showing some important types in the library crate, and how they
|
||||
relate. For example, given a `Workspace`, you can use it to get a `WorkingCopy`
|
||||
or a `RepoLoader`. A `Transaction` is required to acquire a `MutableRepo`, etc.
|
||||
The following sections describe each component.
|
||||
|
||||
```mermaid
|
||||
graph TD;
|
||||
ReadonlyRepo-->Store;
|
||||
ReadonlyRepo-->OpStore;
|
||||
ReadonlyRepo-->OpHeadsStore;
|
||||
ReadonlyRepo-->ReadonlyIndex
|
||||
MutableIndex-->ReadonlyIndex;
|
||||
Store-->Backend;
|
||||
GitBackend-->Backend;
|
||||
LocalBackend-->Backend;
|
||||
LocalBackend-->StackedTable;
|
||||
MutableRepo-->ReadonlyRepo;
|
||||
MutableRepo-->MutableIndex;
|
||||
Transaction-->MutableRepo;
|
||||
WorkingCopy-->TreeState;
|
||||
Workspace-->WorkingCopy;
|
||||
Workspace-->RepoLoader;
|
||||
RepoLoader-->Store;
|
||||
RepoLoader-->OpStore;
|
||||
RepoLoader-->OpHeadsStore;
|
||||
RepoLoader-->ReadonlyRepo;
|
||||
Git-->GitBackend;
|
||||
GitBackend-->StackedTable;
|
||||
```
|
||||
![Type diagram](types.svg)
|
||||
|
||||
_This diagram was created with [Excalidraw]. You can get a copy of it [at this
|
||||
location][types-drawing], and Right Click > "Copy to Clipboard as SVG"._
|
||||
|
||||
[Excalidraw]: https://excalidraw.com/
|
||||
[types-drawing]: https://excalidraw.com/#json=wuOSusqzm6MjoXatFk1kn,aCySj27AVmQMf7aJdMzMCw
|
||||
|
||||
### Backend
|
||||
|
||||
|
|
10
docs/technical/types.svg
Normal file
10
docs/technical/types.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 120 KiB |
Loading…
Reference in a new issue