git

package
v0.1.0-dev.20260301204145 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider provides git actions.

Compensable Forward methods return (string, map[string]any, error): the resource path, the compensation receipt, and an error. The map is opaque to the executor, meaningful only to the corresponding Compensate* Backward method.

+devlore:access=both

func (*Provider) Checkout

func (p *Provider) Checkout(repo, ref string, output io.Writer) (string, error)

Checkout checks out a ref in the given repository directory.

Parameters:

  • repo: Local path to the git repository
  • ref: Branch, tag, or commit to check out

func (*Provider) Clone

func (p *Provider) Clone(url, path string, output io.Writer) (string, map[string]any, error)

Clone clones a repository from url into path. Returns compensation state with the cloned path.

Parameters:

  • url: Git repository URL to clone
  • path: Local directory path for the clone

func (*Provider) CompensateClone

func (p *Provider) CompensateClone(state any) error

CompensateClone removes the cloned directory.

func (*Provider) Pull

func (p *Provider) Pull(repo string, output io.Writer) (string, error)

Pull pulls the latest changes in the given repository directory.

Parameters:

  • repo: Local path to the git repository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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