git-intro/diagrams/branch-move.typ
2026-01-14 11:25:23 +01:00

21 lines
937 B
Typst

#import "@preview/fletcher:0.5.8" as fletcher: diagram, node, edge
#import fletcher.shapes: house, chevron, pill
#import "../definicije.typ": file-object, tree-object, git-object, commit-object
#diagram(node-stroke: 0.5pt,
{
node((1, -1), [main], shape: chevron, name: <main-old>, stroke:(dash: "dotted"))
node((-1, 0), [`e23d19`], shape: pill, name: <commit1>)
node((0, 0), [`3943eb`], shape: pill, name: <commit2>)
node((1, 0), [`98ff21`], shape: pill, name: <commit3>)
node((2, 0), [`4e96a1`], shape: pill, name: <commit4>, stroke: blue)
node((2, -1), [main], shape: chevron, name: <main>)
node((1, 1), [v-1.0], shape: chevron, name: <tag>)
edge(<commit2>, <commit1>, "->")
edge(<commit3>, <commit2>, "->")
edge(<commit4>, <commit3>, "->", stroke: blue)
edge(<main-old>, <commit3>, "->", stroke: (dash: "dotted"))
edge(<tag>, <commit3>, "->")
edge(<main>, <commit4>, "->")
}
)