git

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package git is a dfetch Connector that serves a local git repository as tables — commit history, branches, tags, working-tree status, and tracked files — so repo questions become SQL (and join against github/jira sources) instead of `git log --format | awk` pipelines. It shells out to the `git` binary as an argv (no shell), reading NUL-separated records. It is a builtin under the `git` schema rooted at the working directory's repository; a config source can point elsewhere via params.repo.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(params map[string]any) (source.Connector, error)

New builds a git connector. Params: "repo" (path to the repository, default ".") and "max_rows" (cap on an un-pushable-LIMIT commit scan; default 100000). New(nil) works — a missing repo or git binary errors when a git table is queried, not at construction — so it is a builtin under the `git` schema.

Types

type Connector

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

Connector queries one local git repository.

func (*Connector) Scan

func (c *Connector) Scan(ctx context.Context, req source.ScanRequest, emit func(*source.Rows) error) error

Scan dispatches to the per-table scan.

func (*Connector) Tables

func (c *Connector) Tables() []source.TableSchema

Tables returns the fixed table set.

Jump to

Keyboard shortcuts

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