git

package
v0.1.0-dev.20260305193408 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 5 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 {
	op.ProviderBase
	// contains filtered or unexported fields
}

Provider provides git actions.

+devlore:access=both

func (*Provider) Checkout

func (p *Provider) Checkout(repo, ref string) (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) (string, Tombstone, error)

Clone clones a repository from url into path. Returns the cloned path and a Tombstone for compensation.

Parameters:

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

func (*Provider) CompensateClone

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

CompensateClone removes the cloned directory.

func (*Provider) Pull

func (p *Provider) Pull(repo string) (string, error)

Pull pulls the latest changes in the given repository directory.

Parameters:

  • repo: Local path to the git repository

type Resource

type Resource struct {
	op.ResourceBase
	URL       string
	ClonePath string
	Ref       string
}

Resource represents a cloned git repository.

func (*Resource) Host

func (r *Resource) Host() string

Host returns empty string — git URIs use path-only identification.

func (*Resource) Path

func (r *Resource) Path() string

Path returns the canonicalized absolute clone path.

func (*Resource) Scheme

func (r *Resource) Scheme() string

Scheme returns "git".

func (*Resource) URI

func (r *Resource) URI() string

URI returns the canonical git:// URI for this resource.

type Tombstone

type Tombstone struct {
	op.TombstoneBase
	ClonedPath string
}

Tombstone holds git-specific compensation state.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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