gitbin

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gitbin is the gitremote.Remote that runs the git binary with a clean environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	Home    string
	Askpass string
	Timeout time.Duration
}

Runner runs git. Home is the HOME of every run, Askpass is the program that git runs for a password, and Timeout bounds one run.

func (Runner) Env

func (g Runner) Env(c gitremote.Cred) []string

Env returns the environment of a git run with credential c.

func (Runner) List

func (g Runner) List(ctx context.Context, url string, c gitremote.Cred) (map[string]string, error)

func (Runner) Push

func (g Runner) Push(ctx context.Context, clone, url string, c gitremote.Cred, specs []gitremote.PushSpec) (map[string]gitremote.Outcome, error)

func (Runner) Run

func (g Runner) Run(ctx context.Context, dir string, c gitremote.Cred, stdin string, args ...string) (string, error)

Run runs git in dir with args and returns its output. A failure is a *gitremote.Error.

Jump to

Keyboard shortcuts

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