git

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package git provides lightweight git metadata for the agent's system prompt.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context(cwd string) string

Context returns a human-readable summary of the git state for cwd. Returns "" if cwd is not in a git repo or git is not available. Never returns an error — failures are silent.

Uncommitted porcelain is intentionally omitted: it changes as the agent works, and GPT-5.6 implicit prompt cache misses the entire prefix when any earlier instructions byte changes. Branch and last commit are enough to orient the model; it can run git status for the dirty tree.

Types

This section is empty.

Jump to

Keyboard shortcuts

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