git

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package git is the vcs/1 plugin for the project's repository: status, log graph, branches, diff, blame, stashes and worktrees; commit, checkout, pull, push and the export of a ref.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blame

func Blame(out string) []blame

Blame parses `git blame --line-porcelain`.

func Dir

func Dir() string

Dir is the repository commands run in: the project rig opened the plugin for.

func Git

func Git(ctx context.Context, args ...string) (string, error)

Git runs git in the project and returns its trimmed output.

func Log

func Log(out string) []commit

Log parses `git log --graph --format=logFormat`: graph lines with no commit keep only their graph.

func ParseRemote

func ParseRemote(u string) (host, path string, err error)

func Register

func Register(p *sdk.Plugin, export Export)

func Remote

func Remote(ctx context.Context, name string) (host, path string, err error)

Remote is the forge host and project path of a remote's URL (ssh or https): gitlab.com, group/app.

func Status

func Status(out string) []change

Status parses `git status --porcelain=v1`: a path's state, staged or not.

Types

type Export

type Export func(ctx context.Context, ref string) (string, error)

Export checks a ref out into a cached directory and returns it; the core engine does it.

Jump to

Keyboard shortcuts

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