git

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Branch

type Branch struct {
	Name              string
	IsCurrent         bool
	IsRemote          bool
	LastCommit        string
	LastCommitMessage string
	CommitDate        string
	CommitTimestamp   int64 // Unix timestamp for recency scoring
}

Branch represents a git branch

func (Branch) GeneratePreview

func (b Branch) GeneratePreview(width, height int) string

GeneratePreview generates a lightweight preview of the branch

type Repository

type Repository struct {
	Path string
}

Repository provides git operations for a working directory

func NewRepository

func NewRepository(path string) *Repository

NewRepository creates a Repository for the given path

func (*Repository) Branches

func (r *Repository) Branches() ([]Branch, error)

Branches collects all git branches (local and remote) Lightweight version: does not fetch commit objects for performance

func (*Repository) IsRepo

func (r *Repository) IsRepo() bool

IsRepo checks if the path is a git repository

Jump to

Keyboard shortcuts

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