gitutil

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package gitutil provides hermetic Git subprocess construction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HermeticGitCommand

func HermeticGitCommand(args ...string) *exec.Cmd

HermeticGitCommand constructs a Git command without repository-local environment variables inherited from a parent Git hook. Those variables take precedence over cmd.Dir and `git -C`, which can make a nested command operate on the repository whose hook is running instead of its explicit target.

func WithoutLocalEnv

func WithoutLocalEnv(env []string) []string

WithoutLocalEnv removes the variables listed by `git rev-parse --local-env-vars`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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