Skip to content

Commit 798db9b

Browse files
authored
Merge pull request #103 from braboj/fix/object-diagram-commit-chain
Update object model diagram with vertical commit chain
2 parents dc9c96d + 08e0dee commit 798db9b

2 files changed

Lines changed: 60 additions & 14 deletions

File tree

assets/drawio/git-object-model.drawio

Lines changed: 60 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,105 @@
11
<mxfile host="app.diagrams.net">
22
<diagram id="object-types" name="Object Types">
33
<mxGraphModel dx="1200" dy="700" grid="1" gridSize="10" page="1"
4-
pageWidth="820" pageHeight="520" math="0" shadow="0">
4+
pageWidth="920" pageHeight="560" math="0" shadow="0">
55
<root>
66
<mxCell id="0" />
77
<mxCell id="1" parent="0" />
88

99
<!-- Background card -->
1010
<mxCell id="bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#D3D1C7;strokeWidth=0.5;shadow=0;arcSize=5;" vertex="1" parent="1">
11-
<mxGeometry x="10" y="10" width="800" height="500" as="geometry" />
11+
<mxGeometry x="10" y="10" width="900" height="540" as="geometry" />
12+
</mxCell>
13+
14+
<!-- ==================== ELLIPSIS TOP ==================== -->
15+
<mxCell id="dots-top" value="···" style="text;html=1;align=center;verticalAlign=middle;fontSize=18;fontColor=#888888;fontFamily=Helvetica;fontStyle=1;" vertex="1" parent="1">
16+
<mxGeometry x="290" y="30" width="40" height="30" as="geometry" />
17+
</mxCell>
18+
19+
<!-- ==================== PARENT COMMIT (gray) ==================== -->
20+
<mxCell id="parent-card" value="&lt;b&gt;commit&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:11px&quot;&gt;1f871a&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F1F1F1;strokeColor=#888888;strokeWidth=0.5;shadow=0;arcSize=8;fontSize=14;fontColor=#2C2C2A;fontFamily=Helvetica;verticalAlign=middle;align=center;" vertex="1" parent="1">
21+
<mxGeometry x="250" y="70" width="120" height="60" as="geometry" />
1222
</mxCell>
1323

1424
<!-- ==================== TAG (yellow) ==================== -->
1525
<mxCell id="tag-card" value="&lt;b&gt;tag&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:11px&quot;&gt;v1.0&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FEF9C3;strokeColor=#CA8A04;strokeWidth=0.5;shadow=0;arcSize=8;fontSize=14;fontColor=#854D0E;fontFamily=Helvetica;verticalAlign=middle;align=center;" vertex="1" parent="1">
16-
<mxGeometry x="40" y="200" width="120" height="60" as="geometry" />
26+
<mxGeometry x="60" y="210" width="120" height="60" as="geometry" />
1727
</mxCell>
1828
<mxCell id="tag-desc" value="Named label" style="text;html=1;align=center;verticalAlign=middle;fontSize=11;fontColor=#5F5E5A;fontFamily=Helvetica;fontStyle=2;" vertex="1" parent="1">
19-
<mxGeometry x="40" y="265" width="120" height="20" as="geometry" />
29+
<mxGeometry x="60" y="185" width="120" height="20" as="geometry" />
2030
</mxCell>
2131

2232
<!-- ==================== COMMIT (gray) ==================== -->
2333
<mxCell id="commit-card" value="&lt;b&gt;commit&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:11px&quot;&gt;3a7ed5&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F1F1F1;strokeColor=#888888;strokeWidth=0.5;shadow=0;arcSize=8;fontSize=14;fontColor=#2C2C2A;fontFamily=Helvetica;verticalAlign=middle;align=center;" vertex="1" parent="1">
24-
<mxGeometry x="250" y="200" width="120" height="60" as="geometry" />
34+
<mxGeometry x="250" y="210" width="120" height="60" as="geometry" />
2535
</mxCell>
2636
<mxCell id="commit-desc" value="Snapshot + metadata&lt;br&gt;&lt;font style=&quot;font-size:10px&quot;&gt;tree, parent, author, message&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=top;fontSize=11;fontColor=#5F5E5A;fontFamily=Helvetica;fontStyle=2;" vertex="1" parent="1">
27-
<mxGeometry x="225" y="265" width="170" height="35" as="geometry" />
37+
<mxGeometry x="225" y="275" width="170" height="35" as="geometry" />
38+
</mxCell>
39+
40+
<!-- ==================== CHILD COMMIT (gray) ==================== -->
41+
<mxCell id="child-card" value="&lt;b&gt;commit&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:11px&quot;&gt;a4f2c8&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F1F1F1;strokeColor=#888888;strokeWidth=0.5;shadow=0;arcSize=8;fontSize=14;fontColor=#2C2C2A;fontFamily=Helvetica;verticalAlign=middle;align=center;" vertex="1" parent="1">
42+
<mxGeometry x="250" y="370" width="120" height="60" as="geometry" />
43+
</mxCell>
44+
45+
<!-- ==================== ELLIPSIS BOTTOM ==================== -->
46+
<mxCell id="dots-bottom" value="···" style="text;html=1;align=center;verticalAlign=middle;fontSize=18;fontColor=#888888;fontFamily=Helvetica;fontStyle=1;" vertex="1" parent="1">
47+
<mxGeometry x="290" y="445" width="40" height="30" as="geometry" />
2848
</mxCell>
2949

3050
<!-- ==================== ROOT TREE (coral) ==================== -->
3151
<mxCell id="tree-card" value="&lt;b&gt;tree&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:11px&quot;&gt;da8d6f (root)&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FAECE7;strokeColor=#993C1D;strokeWidth=0.5;shadow=0;arcSize=8;fontSize=14;fontColor=#712B13;fontFamily=Helvetica;verticalAlign=middle;align=center;" vertex="1" parent="1">
32-
<mxGeometry x="460" y="200" width="140" height="60" as="geometry" />
52+
<mxGeometry x="490" y="210" width="140" height="60" as="geometry" />
3353
</mxCell>
3454
<mxCell id="tree-desc" value="Directory listing&lt;br&gt;&lt;font style=&quot;font-size:10px&quot;&gt;entries: type, name, hash&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=top;fontSize=11;fontColor=#5F5E5A;fontFamily=Helvetica;fontStyle=2;" vertex="1" parent="1">
35-
<mxGeometry x="445" y="265" width="170" height="35" as="geometry" />
55+
<mxGeometry x="475" y="275" width="170" height="35" as="geometry" />
3656
</mxCell>
3757

3858
<!-- ==================== SUB-TREE (coral) ==================== -->
3959
<mxCell id="subtree-card" value="&lt;b&gt;tree&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:11px&quot;&gt;6e4aa (src/)&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FAECE7;strokeColor=#993C1D;strokeWidth=0.5;shadow=0;arcSize=8;fontSize=14;fontColor=#712B13;fontFamily=Helvetica;verticalAlign=middle;align=center;" vertex="1" parent="1">
40-
<mxGeometry x="640" y="80" width="140" height="60" as="geometry" />
60+
<mxGeometry x="740" y="100" width="140" height="60" as="geometry" />
4161
</mxCell>
4262

4363
<!-- ==================== BLOB 1 (gray .git) ==================== -->
4464
<mxCell id="blob1-card" value="&lt;b&gt;blob&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:11px&quot;&gt;b24d7 (README.md)&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F1EFE8;strokeColor=#5F5E5A;strokeWidth=0.5;shadow=0;arcSize=8;fontSize=14;fontColor=#2C2C2A;fontFamily=Helvetica;verticalAlign=middle;align=center;" vertex="1" parent="1">
45-
<mxGeometry x="640" y="200" width="140" height="60" as="geometry" />
65+
<mxGeometry x="740" y="210" width="140" height="60" as="geometry" />
4666
</mxCell>
4767

4868
<!-- ==================== BLOB 2 (gray .git) ==================== -->
4969
<mxCell id="blob2-card" value="&lt;b&gt;blob&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:11px&quot;&gt;676b5 (.gitignore)&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F1EFE8;strokeColor=#5F5E5A;strokeWidth=0.5;shadow=0;arcSize=8;fontSize=14;fontColor=#2C2C2A;fontFamily=Helvetica;verticalAlign=middle;align=center;" vertex="1" parent="1">
50-
<mxGeometry x="640" y="340" width="140" height="60" as="geometry" />
70+
<mxGeometry x="740" y="340" width="140" height="60" as="geometry" />
5171
</mxCell>
5272
<mxCell id="blob-desc" value="File contents" style="text;html=1;align=center;verticalAlign=middle;fontSize=11;fontColor=#5F5E5A;fontFamily=Helvetica;fontStyle=2;" vertex="1" parent="1">
53-
<mxGeometry x="640" y="405" width="140" height="20" as="geometry" />
73+
<mxGeometry x="740" y="405" width="140" height="20" as="geometry" />
5474
</mxCell>
5575

5676
<!-- ==================== ARROWS ==================== -->
77+
<!-- dots-top → parent -->
78+
<mxCell id="arrow-dots-parent" value="" style="endArrow=classic;html=1;strokeColor=#444441;strokeWidth=1;endFill=1;endSize=6;" edge="1" parent="1">
79+
<mxGeometry relative="1" as="geometry">
80+
<mxPoint x="310" y="60" as="sourcePoint" />
81+
<mxPoint x="310" y="70" as="targetPoint" />
82+
</mxGeometry>
83+
</mxCell>
84+
85+
<!-- parent → commit -->
86+
<mxCell id="arrow-parent-commit" value="" style="endArrow=classic;html=1;strokeColor=#444441;strokeWidth=1;endFill=1;endSize=6;" edge="1" parent="1" source="parent-card" target="commit-card">
87+
<mxGeometry relative="1" as="geometry" />
88+
</mxCell>
89+
90+
<!-- commit → child -->
91+
<mxCell id="arrow-commit-child" value="" style="endArrow=classic;html=1;strokeColor=#444441;strokeWidth=1;endFill=1;endSize=6;" edge="1" parent="1" source="commit-card" target="child-card">
92+
<mxGeometry relative="1" as="geometry" />
93+
</mxCell>
94+
95+
<!-- child → dots-bottom -->
96+
<mxCell id="arrow-child-dots" value="" style="endArrow=classic;html=1;strokeColor=#444441;strokeWidth=1;endFill=1;endSize=6;" edge="1" parent="1">
97+
<mxGeometry relative="1" as="geometry">
98+
<mxPoint x="310" y="430" as="sourcePoint" />
99+
<mxPoint x="310" y="445" as="targetPoint" />
100+
</mxGeometry>
101+
</mxCell>
102+
57103
<!-- tag → commit -->
58104
<mxCell id="arrow-tag-commit" value="" style="endArrow=classic;html=1;strokeColor=#444441;strokeWidth=1;endFill=1;endSize=6;" edge="1" parent="1" source="tag-card" target="commit-card">
59105
<mxGeometry relative="1" as="geometry" />
@@ -81,10 +127,10 @@
81127

82128
<!-- ==================== LEGEND ==================== -->
83129
<mxCell id="legend-title" value="&lt;b&gt;All objects stored in .git/objects/&lt;/b&gt;" style="text;html=1;align=left;verticalAlign=middle;fontSize=11;fontColor=#5F5E5A;fontFamily=Helvetica;" vertex="1" parent="1">
84-
<mxGeometry x="40" y="440" width="250" height="20" as="geometry" />
130+
<mxGeometry x="40" y="480" width="250" height="20" as="geometry" />
85131
</mxCell>
86132
<mxCell id="legend-hash" value="IDs are SHA-1 hashes (shortened)" style="text;html=1;align=left;verticalAlign=middle;fontSize=11;fontColor=#888888;fontFamily=Helvetica;fontStyle=2;" vertex="1" parent="1">
87-
<mxGeometry x="40" y="462" width="250" height="20" as="geometry" />
133+
<mxGeometry x="40" y="502" width="250" height="20" as="geometry" />
88134
</mxCell>
89135

90136
</root>

assets/images/git-object-model.png

3.42 KB
Loading

0 commit comments

Comments
 (0)