Add incomplete git header parsing functions

I believe the structure is correct, but there are a lot of details to
fill in - translating the C string parsing logic into Go is not always
straightforward.
This commit is contained in:
Billy Keyes
2019-03-14 23:07:52 -07:00
parent bca8d0806e
commit 2a2f704b96
2 changed files with 144 additions and 2 deletions
+17
View File
@@ -1,8 +1,25 @@
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
Score int
Fragments []*Fragment
}