git

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecErrors

func ExecErrors(results []ExecResult) error

ExecErrors returns a combined error if any results have non-zero exit codes or errors.

func Register

func Register(root *cobra.Command)

Register adds all git commands to root.

func WriteResults

func WriteResults(w io.Writer, results []ExecResult)

WriteResults writes all result stdout and stderr to w.

Types

type ExecOptions

type ExecOptions struct {
	MaxConcurrency int           // 0 → runtime.NumCPU()
	Timeout        time.Duration // 0 → no timeout
	Async          bool          // false → serial run with stdin passthrough
}

ExecOptions configures a RunParallel invocation.

type ExecResult

type ExecResult struct {
	RepoName string
	Stdout   []byte
	Stderr   []byte
	ExitCode int
	Err      error
}

ExecResult holds the outcome of running a git command in one repo.

func RunParallel

func RunParallel(repos []repo.Repo, args []string, opts ExecOptions) []ExecResult

RunParallel executes git args in each repo. Async=false: stdin passes through; output not prefixed (one repo at a time). Async=true: stdin suppressed; output captured and prefixed "[name]".

Jump to

Keyboard shortcuts

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