git

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Branch

func Branch(dir string) (string, error)

Branch returns the branch name for a directory

func Commit

func Commit(dir string) (string, error)

Commit returns the HEAD commit hash for a directory

func MatchRemotes

func MatchRemotes(r1, r2 string) bool

MatchRemotes compares two github remotes and returns true if the point to the same project. This allows for git and https remotes to be compared and host aliases to be normalized

func Message

func Message(dir string) (string, error)

Message returns the HEAD commit message for a directory

func ParseGittableURL

func ParseGittableURL(ref string) (*url.URL, error)

ParseGittableURL parses and converts a git repository url into a url.URL

func Remote

func Remote(dir string) (string, error)

Remote returns the git remote for a given directory

Types

This section is empty.

Jump to

Keyboard shortcuts

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