reporoot

package
v0.10.257 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package reporoot resolves the current Git worktree root for review safety checks.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnavailable = errors.New("reporoot: unavailable")

ErrUnavailable reports that the current process is not running inside a Git worktree, so no invocation root is available.

Functions

func Resolve

func Resolve(ctx context.Context, dir string, run GitCommand) (string, error)

Resolve returns the canonical Git worktree root for dir or the current process directory when dir is empty.

Types

type GitCommand

type GitCommand func(context.Context, string, ...string) ([]byte, error)

GitCommand resolves a git command in an optional working directory.

Jump to

Keyboard shortcuts

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