gitutil

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package gitutil resolves the current commit without the git binary or a full git library — donkey only needs a short sha for image tags.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HeadSHA

func HeadSHA(dir string) string

HeadSHA returns the short (12 char) commit sha of HEAD for the repository containing dir, or "" when dir is not inside a git repository or HEAD cannot be resolved. It never fails: image tags fall back to timestamps.

func RepoRoot

func RepoRoot(dir string) string

RepoRoot returns the folder containing the repository dir belongs to, or "" when dir is not inside one. donkey uses it to name spaces: every app in a repository belongs together.

Types

This section is empty.

Jump to

Keyboard shortcuts

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