From a05244018ae02603c56a27f8f8b7006c0024f7ea Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Mon, 19 Dec 2022 11:36:50 +0530 Subject: git: check for binary files --- git/diff.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'git/diff.go') 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{ -- cgit