summaryrefslogtreecommitdiffstats
path: root/git/diff.go
diff options
context:
space:
mode:
authorLibravatar Anirudh Oppiliappan <x@icyphox.sh>2022-12-19 11:36:50 +0530
committerLibravatar Anirudh Oppiliappan <x@icyphox.sh>2022-12-19 11:36:50 +0530
commita05244018ae02603c56a27f8f8b7006c0024f7ea (patch)
treef01ac8969e4914421c8b7b0e3b1cf9f9b2892546 /git/diff.go
parent8ba1a9609adef8575a91219ef35eef97daad8d32 (diff)
downloadlegit-a05244018ae02603c56a27f8f8b7006c0024f7ea.tar.gz
legit-a05244018ae02603c56a27f8f8b7006c0024f7ea.tar.bz2
legit-a05244018ae02603c56a27f8f8b7006c0024f7ea.zip
git: check for binary files
Diffstat (limited to 'git/diff.go')
-rw-r--r--git/diff.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/git/diff.go b/git/diff.go
index 38c00f2..063ac87 100644
--- a/git/diff.go
+++ b/git/diff.go
@@ -20,6 +20,7 @@ type Diff struct {
New string
}
TextFragments []TextFragment
+ IsBinary bool
}
// A nicer git diff representation.
@@ -88,6 +89,7 @@ func (g *GitRepo) Diff() (*NiceDiff, error) {
ndiff := Diff{}
ndiff.Name.New = d.NewName
ndiff.Name.Old = d.OldName
+ ndiff.IsBinary = d.IsBinary
for _, tf := range d.TextFragments {
ndiff.TextFragments = append(ndiff.TextFragments, TextFragment{