git

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DatabaseFile = "pkgs.sqlite3"

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

func OpenRepository

func OpenRepository(path string) (*Repository, error)

func (*Repository) CommitObject

func (r *Repository) CommitObject(hash plumbing.Hash) (*object.Commit, error)

func (*Repository) CurrentBranch

func (r *Repository) CurrentBranch() (string, error)

func (*Repository) DatabasePath

func (r *Repository) DatabasePath() string

func (*Repository) FileAtCommit

func (r *Repository) FileAtCommit(commit *object.Commit, path string) (string, error)

func (*Repository) GetDependencies added in v0.11.2

func (r *Repository) GetDependencies(commitRef, branchName string) ([]database.Dependency, error)

GetDependencies returns dependencies at the specified commit, indexing on demand if needed. The database is closed before returning.

func (*Repository) GetDependenciesWithDB added in v0.11.2

func (r *Repository) GetDependenciesWithDB(commitRef, branchName string) ([]database.Dependency, *database.DB, error)

GetDependenciesWithDB returns dependencies at the specified commit along with an open database handle. The caller is responsible for closing the database. This is useful for commands that need to cache enrichment data.

func (*Repository) GitDir

func (r *Repository) GitDir() string

func (*Repository) Head

func (r *Repository) Head() (*plumbing.Reference, error)

func (*Repository) IndexCommitSnapshot added in v0.11.2

func (r *Repository) IndexCommitSnapshot(db *database.DB, branchID int64, sha string) error

IndexCommitSnapshot analyzes a single commit and stores its snapshot.

func (*Repository) LocalBranches added in v0.11.2

func (r *Repository) LocalBranches() (map[string][]string, error)

LocalBranches returns a map of commit SHA to branch names for all local branch heads.

func (*Repository) Log

func (r *Repository) Log(from plumbing.Hash) (object.CommitIter, error)

func (*Repository) ResolveRevision

func (r *Repository) ResolveRevision(rev string) (*plumbing.Hash, error)

func (*Repository) Tags added in v0.11.2

func (r *Repository) Tags() (map[string][]string, error)

Tags returns a map of commit SHA to tag names for all tags in the repository.

func (*Repository) TreeAtCommit

func (r *Repository) TreeAtCommit(commit *object.Commit) (*object.Tree, error)

func (*Repository) WorkDir

func (r *Repository) WorkDir() string

Jump to

Keyboard shortcuts

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