diff options
author | Anirudh Oppiliappan <x@icyphox.sh> | 2022-12-19 18:07:13 +0530 |
---|---|---|
committer | Anirudh Oppiliappan <x@icyphox.sh> | 2022-12-19 18:07:13 +0530 |
commit | 263a1509dbd79b1df3abe1bd42e2cd5d45448dea (patch) | |
tree | cfd115845d0f104fdb4794980a415c5f08ced8e0 /git/diff.go | |
parent | 194ec63d81ed7c8d6f63945139ea6d0bdfc597b3 (diff) | |
download | legit-263a1509dbd79b1df3abe1bd42e2cd5d45448dea.tar.gz legit-263a1509dbd79b1df3abe1bd42e2cd5d45448dea.tar.bz2 legit-263a1509dbd79b1df3abe1bd42e2cd5d45448dea.zip |
diff: show diff type
Diffstat (limited to '')
-rw-r--r-- | git/diff.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/git/diff.go b/git/diff.go index 063ac87..93c823a 100644 --- a/git/diff.go +++ b/git/diff.go @@ -21,6 +21,8 @@ type Diff struct { } TextFragments []TextFragment IsBinary bool + IsNew bool + IsDelete bool } // A nicer git diff representation. @@ -90,6 +92,8 @@ func (g *GitRepo) Diff() (*NiceDiff, error) { ndiff.Name.New = d.NewName ndiff.Name.Old = d.OldName ndiff.IsBinary = d.IsBinary + ndiff.IsNew = d.IsNew + ndiff.IsDelete = d.IsDelete for _, tf := range d.TextFragments { ndiff.TextFragments = append(ndiff.TextFragments, TextFragment{ |