From 61d9430531193376e789af103ec4b6c442cb7a23 Mon Sep 17 00:00:00 2001 From: hoijui Date: Wed, 7 Aug 2019 21:03:13 +0200 Subject: [PATCH 1/3] README: make the feature-list render as list in more Markdown flavors [fix] --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 05181246db15a2ace950c53b9cb48cb17ad8c472..42501ebc04d2e7160a48249be123cc3dbe80c5db 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ `git-bug` is a bug tracker that: + - **fully embed in git**: you only need your git repository to have a bug tracker - **is distributed**: use your normal git remote to collaborate, push and pull your bugs ! - **works offline**: in a plane or under the sea ? keep reading and writing bugs From 98792a029b1f869986f1d670787a53dd2eaebbc0 Mon Sep 17 00:00:00 2001 From: hoijui Date: Mon, 28 Oct 2019 16:32:51 +0100 Subject: [PATCH 2/3] model: try to describe the `OperationPack` format more clearly --- doc/model.md | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/doc/model.md b/doc/model.md index ad5e6ce93400830b06382f5902a802bdf9958d5e..e60a2fa8886b16c5a5aa30b3961f359c22453eca 100644 --- a/doc/model.md +++ b/doc/model.md @@ -8,23 +8,33 @@ The biggest problem when creating a distributed bug tracker is that there is no To deal with this problem, you need a way to merge these changes in a meaningful way. -Instead of storing directly the final bug data, we store a series of edit `Operation`s. One such operation could looks like this: +Instead of storing the final bug data directly, we store a series of edit `Operation`s. + +Note: In git-bug internally it is a golang struct, but in the git repo it is stored as JSON, as seen later. + +These `Operation`s are aggregated in an `OperationPack`, a simple array. An `OperationPack` represents an edit session of a bug. We store this pack in git as a git `Blob`; that consists of a string containing a JSON array of operations. One such pack -- here with two operations -- might look like this: ```json -{ - "type": "SET_TITLE", - "author": { - "id": "5034cd36acf1a2dadb52b2db17f620cc050eb65c" +[ + { + "type": "SET_TITLE", + "author": { + "id": "5034cd36acf1a2dadb52b2db17f620cc050eb65c" + }, + "timestamp": 1533640589, + "title": "This title is better" }, - "timestamp": 1533640589, - "title": "This title is better" -} + { + "type": "ADD_COMMENT", + "author": { + "id": "5034cd36acf1a2dadb52b2db17f620cc050eb65c" + }, + "timestamp": 1533640589, + "title": "This title is better" + } +] ``` -Note: Json provided for readability. Internally it's a golang struct. - -These `Operation`s are aggregated in an `OperationPack`, a simple array. An `OperationPack` represents an edit session of a bug. We store this pack in git as a git `Blob`; that is arbitrary serialized data. - To reference our `OperationPack`, we create a git `Tree`; it references our `OperationPack` `Blob` under `"\ops"`. If any edit operation includes a media (for instance in a message), we can store that media as a `Blob` and reference it here under `"/media"`. To complete the picture, we create a git `Commit` that references our `Tree`. Each time we add more `Operation`s to our bug, we add a new `Commit` with the same data-structure to form a chain of `Commit`s. From efb084b48157b827407d7db47f8710a39e8e6564 Mon Sep 17 00:00:00 2001 From: hoijui Date: Tue, 29 Oct 2019 07:16:31 +0100 Subject: [PATCH 3/3] Make the ADD_COMMENT example more realistic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Michael Muré --- doc/model.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/model.md b/doc/model.md index e60a2fa8886b16c5a5aa30b3961f359c22453eca..c6d12bf5dc3f05c82a92e96f23f3f12db7db43ec 100644 --- a/doc/model.md +++ b/doc/model.md @@ -29,8 +29,8 @@ These `Operation`s are aggregated in an `OperationPack`, a simple array. An `Ope "author": { "id": "5034cd36acf1a2dadb52b2db17f620cc050eb65c" }, - "timestamp": 1533640589, - "title": "This title is better" + "timestamp": 1533640612, + "message": "A new comment" } ] ```