git

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRepo

func IsRepo(path string) bool

IsRepo return true is a directory is a git repo

Types

type Options

type Options struct {
	CWD string
}

type Repository

type Repository struct {
	Options Options
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(dir string) (*Repository, error)

NewRepository opens a git repository from the specified directory

func (*Repository) HeadCommitSHA

func (r *Repository) HeadCommitSHA() (string, error)

Return the SHA of the commita at HEAD

func (*Repository) SourceURL

func (r *Repository) SourceURL() (string, error)

SourceURL returns the repository URL

Jump to

Keyboard shortcuts

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