git

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package git package needs reworked into proper Git libraries. However, this package will remain using exec as it was easiest to port from go-gilt's python counterpart.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

type Git struct {
	// contains filtered or unexported fields
}

Git implementation responsible for Git operations.

func New

func New(
	appFs afero.Fs,
	debug bool,
	execManager internal.ExecManager,
	logger *slog.Logger,
) *Git

New factory to create a new Git instance.

func (*Git) Clone

func (g *Git) Clone(
	gitURL string,
	cloneDir string,
) error

Git clone repo. This is a bare repo, with only metadata to start with.

func (*Git) Worktree added in v1.0.2

func (g *Git) Worktree(
	cloneDir string,
	version string,
	dstDir string,
) error

Create a working tree from the repo in `cloneDir` at `version` in `dstDir`. Under the covers, this will download any/all required objects from origin into the cache

Jump to

Keyboard shortcuts

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