xgit

package
v0.27.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreChangesCommitted

func AreChangesCommitted(dir string) (bool, error)

AreChangesCommitted returns true if dir is a clean git repository with no pending changes. It returns also true if dir is NOT a git repository.

func Clone added in v0.26.0

func Clone(ctx context.Context, urlRef, dir string) error

Clone clones a git repository represented by urlRef, into dir. urlRef is the URL of the repository, with an optional ref, suffixed to the URL with a `@`. Ref can be a tag, a branch or a hash. Valid examples of urlRef: github.com/org/repo, github.com/org/repo@v1, github.com/org/repo@develop, github.com/org/repo@ab88cdf.

func InitAndCommit added in v0.26.0

func InitAndCommit(path string) error

InitAndCommit creates a git repo in path if path isn't already inside a git repository, then commits path content.

func IsRepository added in v0.27.0

func IsRepository(path string) (bool, error)

IsRepository checks if a path contains a 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