From b43a447ab6677438da0609abda0c1492bf422dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Sat, 25 Jun 2022 12:20:32 +0200 Subject: [PATCH] doc: tiny tweaks --- doc/model.md | 12 ++++++++++-- entity/dag/example_test.go | 5 ++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/doc/model.md b/doc/model.md index 0aad478966aef5d33dfceacc00bb02cd0fc675f7..955aa07ae609e0dc40695624606a3ca7dcab96c6 100644 --- a/doc/model.md +++ b/doc/model.md @@ -1,9 +1,17 @@ Entities data model =================== -If you are not familiar with [git internals](https://git-scm.com/book/en/v1/Git-Internals), you might first want to read about them, as the `git-bug` data model is built on top of them. +This document explains how git-bug's reusable distributed data structure in git is working. This data structure is capable of: +- storing an entity and its complete history in git +- carry signed authorship of editions +- use git remotes as a medium for synchronisation and collaboration +- merge conflicts +- respect the rules you define as to what edition are possible +- carry attached media + +If you are looking for a different format or to see how you can easily make your own, checkout [the example code](../entity/dag/example_test.go). -In a different format, see how you can easily make your own [distributed data structure](../entity/dag/example_test.go). +If you are not familiar with [git internals](https://git-scm.com/book/en/v1/Git-Internals), you might first want to read about them, as the `git-bug` data model is built on top of them. ## Entities (bug, author, ...) are a series of edit operations diff --git a/entity/dag/example_test.go b/entity/dag/example_test.go index 948d6aeb5fc9695a9e3253f4a627ca80049931df..e6f5db86b852cebff282f30f173dd0e48a0cb1b9 100644 --- a/entity/dag/example_test.go +++ b/entity/dag/example_test.go @@ -11,7 +11,10 @@ import ( "github.com/MichaelMure/git-bug/repository" ) -// This file explains how to define a replicated data structure, stored and using git as a medium for +// Note: you can find explanations about the underlying data model here: +// https://github.com/MichaelMure/git-bug/blob/master/doc/model.md + +// This file explains how to define a replicated data structure, stored in and using git as a medium for // synchronisation. To do this, we'll use the entity/dag package, which will do all the complex handling. // // The example we'll use here is a small shared configuration with two fields. One of them is special as