gitshell

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectBranch

func DetectBranch(startDir string) string

DetectBranch returns current branch name when available. In detached HEAD mode, it returns "detached@<short_sha>". For non-repository directories, it returns an empty string.

func IsDirty

func IsDirty(startDir string) bool

IsDirty reports whether the git working tree contains uncommitted changes. For non-repository directories, it returns false.

func RunInDir

func RunInDir(dir string, args ...string) (string, error)

RunInDir executes git command in the provided directory and returns trimmed stdout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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