@ridit/forge 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +16 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Forge
2
2
 
3
- Forge is a lightweight version control system built from scratch. Designed to be simple, fast, and easy to understand — Forge gives you the core of a VCS without the complexity of Git.
3
+ > Git, but yours.
4
+
5
+ Forge is a lightweight version control system built from scratch. Designed to be simple and easy to understand — Forge gives you the core of a VCS without the complexity of Git.
4
6
 
5
7
  ## Installation
6
8
 
@@ -24,6 +26,7 @@ npm install -g @ridit/forge
24
26
  - **Status** — view modified, staged, untracked, and deleted files
25
27
  - **Checkpoints** — auto-saved snapshots when switching branches
26
28
  - **ForgeIgnore** — `.forgeignore` support to exclude files
29
+ - **Content-addressable storage** — file content stored as hashed objects, never duplicated
27
30
 
28
31
  ## CLI Commands
29
32
 
@@ -56,16 +59,27 @@ Forge stores all data in a `.forge` folder at the root of your repository:
56
59
 
57
60
  ```
58
61
  .forge/
62
+ ├── objects/ ← content-addressable file storage (hashed)
59
63
  ├── commits/ ← global commit refs (lightweight)
60
64
  ├── branches/
61
65
  │ └── main/
62
66
  │ ├── branch.json ← branch metadata + latest commit id
63
67
  │ ├── checkpoint.json ← auto-snapshot saved on branch switch
64
- │ └── commits/ ← full commits with file blobs
68
+ │ └── commits/ ← full commits with file hashes
65
69
  ├── repo.json ← repo metadata + active branch
66
70
  └── tempAddedFiles.json ← staging area
67
71
  ```
68
72
 
73
+ ## Object Storage
74
+
75
+ Instead of storing full file content in every commit, Forge uses a content-addressable object store — similar to how Git works internally.
76
+
77
+ - Every file is hashed with SHA-256 on `add`
78
+ - The content is stored once in `.forge/objects/` keyed by hash
79
+ - Commits store only file paths + hashes — not the full content
80
+ - Same file content across 100 commits = stored **once**
81
+ - Duplicate files across branches = stored **once**
82
+
69
83
  ## Branch System
70
84
 
71
85
  - Every branch stores its own commit history
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ridit/forge",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Git, but yours.",
5
5
  "author": "Ridit Jangra <riditjangra09@gmail.com> (https://ridit.space)",
6
6
  "license": "MIT",