Documentation
¶
Overview ¶
Package gitargv parses Git's stable global argv and classifies invocations that cannot safely be buffered by sctx.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasFlag ¶
HasFlag reports whether a command-local option is present before --. Long equals forms and one-letter short clusters are recognized.
func HasOptionPrefix ¶
HasOptionPrefix reports options whose value may be attached with '='.
func SafeToBuffer ¶
func SafeToBuffer(inv Invocation) bool
SafeToBuffer rejects commands that stream, run an interactive UI/editor, or wait for a protocol on stdin. All other Git commands are finite and may reach the formatter's structured/relaxed/verbatim tier chain.
Types ¶
type Invocation ¶
Invocation identifies Git's command and the arguments after it.
func Parse ¶
func Parse(argv []string) (Invocation, bool)
Parse locates Git's command after global options. Unknown global options decline instead of guessing whether their next token is a value.