gitx

package
v0.5.20 Latest Latest
Warning

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

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

Documentation

Overview

Package gitx shells out to git for revision-aware file access.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo struct{ Dir string }

Repo is a handle to a git repository working directory.

func Open

func Open(dir string) (*Repo, error)

Open locates the repository root at or above dir.

func (*Repo) ChangedFiles

func (r *Repo) ChangedFiles(base, target string) ([]string, error)

ChangedFiles lists paths changed between base and target revision. target == "" means the working tree (including untracked files).

func (*Repo) ResolveRev

func (r *Repo) ResolveRev(rev string) error

ResolveRev verifies a revision exists and returns a short display form.

func (*Repo) Show

func (r *Repo) Show(rev, path string) ([]byte, error)

Show returns the file contents at a revision, or the working-tree file when rev == "". A missing file returns (nil, nil).

Jump to

Keyboard shortcuts

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