Files
bluekeyes-go-gitdiff/gitdiff/gitdiff.go
T
Billy Keyes 699084298b Accept comments when parsing fragment headers
Also parse the header directly instead of using a regexp. This allows
finer-grained errors.
2019-03-24 20:49:27 -07:00

38 lines
571 B
Go

package gitdiff
import (
"os"
)
// File describes changes to a single file. It can be either a text file or a
// binary file.
type File struct {
OldName string
NewName string
IsNew bool
IsDelete bool
IsCopy bool
IsRename bool
OldMode os.FileMode
NewMode os.FileMode
OldOIDPrefix string
NewOIDPrefix string
Score int
Fragments []*Fragment
}
// Fragment describes changed lines starting at a specific line in a text file.
type Fragment struct {
Comment string
OldPosition int64
OldLines int64
NewPosition int64
NewLines int64
}