summaryrefslogtreecommitdiffstats
path: root/pkg/commands/files.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/commands/files.go')
-rw-r--r--pkg/commands/files.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/commands/files.go b/pkg/commands/files.go
index ac508941b..c66ffc5cf 100644
--- a/pkg/commands/files.go
+++ b/pkg/commands/files.go
@@ -2,6 +2,7 @@ package commands
import (
"fmt"
+ "io/ioutil"
"os"
"path/filepath"
"strconv"
@@ -15,7 +16,11 @@ import (
// CatFile obtains the content of a file
func (c *GitCommand) CatFile(fileName string) (string, error) {
- return c.OSCommand.CatFile(fileName)
+ buf, err := ioutil.ReadFile(fileName)
+ if err != nil {
+ return "", nil
+ }
+ return string(buf), nil
}
func (c *GitCommand) OpenMergeToolCmd() string {