git

package
v0.8.0-a.15 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package git wraps the go-git operations the resolver needs: resolving a ref to a commit SHA without fetching, listing a repo's tags, and cloning a repo at a specific ref into a directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone(ctx context.Context, url, ref, dest string) (string, error)

Clone clones the repo at url into dest and checks out ref. dest must not yet exist. Returns the resolved commit SHA.

func ListTags added in v0.6.0

func ListTags(ctx context.Context, url string) ([]string, error)

ListTags returns the tag names defined on the remote at url, without the `refs/tags/` prefix. Peeled annotated-tag refs (the `^{}` entries) are excluded so each tag appears once. No local clone is created. Order is whatever the remote reports; callers that need ordering sort the result themselves.

func LsRemote

func LsRemote(ctx context.Context, url, ref string) (string, error)

LsRemote returns the commit SHA that ref points at on the remote at url. ref may be a tag, branch, or a full commit SHA. No local clone is created.

Types

This section is empty.

Jump to

Keyboard shortcuts

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