git

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 11 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 git provides an integration with the git command

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean

func Clean(output string, err error) (string, error)

Clean the output.

func CleanAllLines

func CleanAllLines(output string, err error) ([]string, error)

CleanAllLines returns all the non empty lines of the output, cleaned up.

func ExtractRepoFromConfig

func ExtractRepoFromConfig(ctx context.Context) (result config.Repo, err error)

ExtractRepoFromConfig gets the repo name from the Git config.

func ExtractRepoFromURL

func ExtractRepoFromURL(rawurl string) (config.Repo, error)

func IsRepo

func IsRepo(ctx context.Context) bool

IsRepo returns true if current folder is a git repository.

func RedactURLCredentials

func RedactURLCredentials(s string) string

RedactURLCredentials removes URL user information from diagnostic text.

func Run

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

Run runs a git command and returns its output or errors.

func RunWithEnv

func RunWithEnv(ctx context.Context, env []string, args ...string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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