rawdiff

package
v16.5.0-rc43 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diff

type Diff struct {
	SrcMode string
	DstMode string
	SrcSHA  string
	DstSHA  string
	Status  string
	SrcPath string
	DstPath string // optional!
}

Diff represents a `git diff --raw` entry.

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser is a parser for the "-z" variant of the "RAW DIFF FORMAT" documented in `git help diff`.

func NewParser

func NewParser(r io.Reader) *Parser

NewParser returns a new Parser instance. The reader must contain output from `git diff --raw -z`.

func (*Parser) NextDiff

func (p *Parser) NextDiff() (*Diff, error)

NextDiff returns the next raw diff. If there are no more diffs, the error is io.EOF.

Jump to

Keyboard shortcuts

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