diff options
| author | 2026-03-29 13:38:19 +0000 | |
|---|---|---|
| committer | 2026-03-29 13:39:49 +0000 | |
| commit | 37707aada0157f255dbad920b917efb601184e12 (patch) | |
| tree | 29f79d242c764de8d6f1e65bcc847e53f21cd646 /commitquery/node_new.go | |
| parent | commitquery: Context has been gone long ago (diff) | |
| signature | No signature | |
commitquery: Reorganize
Diffstat (limited to 'commitquery/node_new.go')
| -rw-r--r-- | commitquery/node_new.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/commitquery/node_new.go b/commitquery/node_new.go new file mode 100644 index 00000000..14a35262 --- /dev/null +++ b/commitquery/node_new.go @@ -0,0 +1,14 @@ +package commitquery + +import objectid "codeberg.org/lindenii/furgit/object/id" + +// newNode allocates one empty internal node. +func (query *query) newNode(id objectid.ObjectID) nodeIndex { + count := len(query.nodes) + + idx := nodeIndex(count) + + query.nodes = append(query.nodes, node{id: id}) + + return idx +} |
