HelloZeroNet / HelloZeroNet/ZeroNet

Use DAG for version control

オープン
#1,284 コメント 12 件 リアクション 3 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
18.8k
フォーク
2.3k
PR マージ指標
30日以内にマージされた PR はありません

説明

Hey, ZeroNet dev!

Doing version control? Consider the following _Directed Acyclic Graph_.

```
(3) (4)
↙ ↙
(0) ← (1) ← (2) ← (5)
```

Suppose these are your ZeroMe posts. Each file contains several posts. Each file is a _vertex_. You started with file `(0)`. You wrote a lot and file `(0)` exploded. You decided to make a new file `(1)` and continue writing. Weeks later, file `(1)` became full and you made another new file `(2)`.

Then you decided to edit one of your old posts and expand it a little bit. It is contained in file `(0)`. Unfortunately, your edit cannot be saved in file `(0)` because the file hit its size limit. Using a DAG, what you need to do is to

a) make a new file `(3)` and put your edited post there;
b) delete the old post from file `(0)`;
c) draw an arrow from file `(3)` to file `(0)`.

Each _vertex_ has multiple arrows going in (_in degree_), but only 1 arrow going out (_out degree_).

The earliest file is a _sink_, it has no "out" arrow. Newer files point to older files, letting you to go back in time.

You may ask, "what about file name conflict?" Short answer: This is how file systems work. To keep multiple versions of the same file, all you need to do is to name them properly.

```
fsfs-1.pdf Free Software, Free Society (first edition)
fsfs-2.pdf Free Software, Free Society (second edition)
fsfs-3.pdf Free Software, Free Society (third edition)
```

Good luck hacking DAGs and keeping manifest files small!

References:
[Git for Computer Scientists](http://eagain.net/articles/git-for-computer-scientists/)
[Git - Basic Branching and Merging](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging)

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

No source file, entry point, or test is named. Start by reading the DAG examples and the linked Git references, then locate ZeroNet’s manifest and file-version handling. Clarify how edits, deletion, arrows, file naming, size limits, and history traversal should work; done requires an agreed design and tests for those cases.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
git
領域
tooling
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
20/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。