git

package
v0.11.1-a.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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