gitutil

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone(repo, destDir, ref string) (string, error)

Clone shallow-clones a git repo to destDir and returns the short commit hash. If ref is empty, clones the default branch. The repo param accepts owner/repo shorthand or a full URL.

func RemoteHead

func RemoteHead(repo, ref string) (string, error)

RemoteHead returns the short commit hash of the remote HEAD (or ref) without cloning. Useful for checking if an update is available.

func RepoURL

func RepoURL(repo string) string

RepoURL expands an owner/repo shorthand to a GitHub HTTPS URL. Full URLs are returned unchanged.

Types

This section is empty.

Jump to

Keyboard shortcuts

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