commitquery

package
v0.1.171 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package commitquery provides commit ancestry and merge-base queries over object storage.

It uses commit-ish object IDs, peeling annotated tags when needed, and can use an optional commit-graph reader for performance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queries added in v0.1.121

type Queries struct {
	// contains filtered or unexported fields
}

Queries provides commit-domain queries over one object fetcher and optional commit-graph reader.

Queries reuses internal mutable query workers across operations.

Labels: MT-Safe.

func New

func New(fetcher *objectfetch.Fetcher, graph *commitgraphread.Reader) *Queries

New builds one concurrent-safe commit query service over one object fetcher and optional commit-graph reader.

Labels: Deps-Borrowed, Life-Parent.

func (*Queries) IsAncestor added in v0.1.121

func (queries *Queries) IsAncestor(ancestor, descendant objectid.ObjectID) (bool, error)

IsAncestor reports whether ancestor is reachable from descendant through commit parent edges.

Both inputs are peeled through annotated tags before commit traversal.

func (*Queries) MergeBase added in v0.1.121

func (queries *Queries) MergeBase(left, right objectid.ObjectID) (objectid.ObjectID, bool, error)

MergeBase reports one merge base between left and right, if any.

func (*Queries) MergeBases added in v0.1.121

func (queries *Queries) MergeBases(left, right objectid.ObjectID) ([]objectid.ObjectID, error)

MergeBases reports all merge bases in Git's merge-base --all order.

Both inputs are peeled through annotated tags before commit traversal.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL