git

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EffectiveDir

func EffectiveDir(ctx context.Context, projectDir, currentDir string, c *cache.Cache) string

EffectiveDir returns the best directory for git operations. Tries projectDir first, falls back to finding git root from currentDir. Results are cached using the provided cache (if non-nil).

func FindRoot

func FindRoot(ctx context.Context, dir string) string

FindRoot runs git rev-parse --show-toplevel from the given directory to find the git root. Returns empty string if not in a git repo.

func IsRepo

func IsRepo(ctx context.Context, dir string) bool

IsRepo checks if a directory is inside a git repository.

Types

This section is empty.

Jump to

Keyboard shortcuts

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