gitrun

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 6 Imported by: 2

Documentation

Overview

Package gitrun executes authenticated git subprocesses with context deadlines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	Cred auth.Credential
}

Runner runs git with optional auth headers and working directory.

func (Runner) AllowFail

func (r Runner) AllowFail(ctx context.Context, dir string, args ...string) (string, int)

AllowFail runs git and returns stdout with exit code.

func (Runner) IsRepo

func (r Runner) IsRepo(dir string) bool

IsRepo reports whether dir is inside a git work tree.

func (Runner) Run

func (r Runner) Run(ctx context.Context, dir string, args ...string) (string, error)

Run executes git in dir with auth configuration prepended.

func (Runner) RunTrim

func (r Runner) RunTrim(ctx context.Context, dir string, args ...string) (string, error)

RunTrim is Run with trimmed stdout.

Jump to

Keyboard shortcuts

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