git

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package git implements helpers for interacting with git

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoHeadBranch is returned when a repository's HEAD (aka default) branch cannot
	// be determine
	ErrNoHeadBranch = errors.New("failed to find a head branch, does one exist?")

	// ErrNoRemoteHeadBranch is returned when a repository's remote  default/HEAD branch
	// cannot be determined.
	ErrNoRemoteHeadBranch = errors.New("failed to get head branch from remote origin")
)

This block contains errors and regexes

Functions

func GetDefaultBranch

func GetDefaultBranch(ctx context.Context, path string) (string, error)

GetDefaultBranch determines the default/HEAD branch for a given git repository.

Types

This section is empty.

Jump to

Keyboard shortcuts

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