Porcelain provides parsers for Git's porcelain status output in Go.
- github.com/mroth/porcelain/statusv1 provides
porcelain=v1
format parsing. - github.com/mroth/porcelain/statusv2 provides
porcelain=v2
format parsing.
The parsers are performant (parsing a typical git status report including headers in ~2µs single-threaded), and robust (fuzz tested to avoid any possible crashing panics).
Support for both regular (LF delimited) and -z
(NUL delimited) output formats
is provided.
The porcelain=v2
format was first introduced in Git v2.11.0 (2016), and is
recommended for most use cases, as it is significantly more robust and addresses
some inconsistencies with the historic porcelain=v1
format.