summaryrefslogtreecommitdiffstats
path: root/git/git.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--git/git.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/git/git.go b/git/git.go
index 3756840..34e8a80 100644
--- a/git/git.go
+++ b/git/git.go
@@ -76,7 +76,13 @@ func (g *GitRepo) FileContent(path string) (string, error) {
return "", err
}
- return file.Contents()
+ isbin, _ := file.IsBinary()
+
+ if !isbin {
+ return file.Contents()
+ } else {
+ return "Not displaying binary file", nil
+ }
}
func (g *GitRepo) Tags() ([]*object.Tag, error) {