gitlib

package
v0.0.0-...-0fd85f3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Branch

func Branch(repo *git.Repository) (string, error)

func Dirty

func Dirty(repo *git.Repository) (bool, error)

func FindDotGit

func FindDotGit(cwd string) (root string, repo *git.Repository, err error)
func Head(repo *git.Repository) (plumbing.Reference, error)

func Origin

func Origin(repo *git.Repository) (*url.URL, error)

func Sha

func Sha(repo *git.Repository) (string, error)

Types

type DotGit

type DotGit struct {
	// Path   string
	Branch string
	Sha    string
	Root   string
	Origin *url.URL
	Dirty  bool
}

func FromCwd

func FromCwd() (found DotGit, err error)

Jump to

Keyboard shortcuts

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