summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/commands/git.go')
-rw-r--r--pkg/commands/git.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go
index 1e36aa84c..b56650e97 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -86,16 +86,17 @@ func (c *GitCommand) GetStatusFiles() []File {
change := statusString[0:2]
stagedChange := change[0:1]
unstagedChange := statusString[1:2]
- filename := statusString[3:]
+ filename := c.OSCommand.Unquote(statusString[3:])
tracked := !includes([]string{"??", "A ", "AM"}, change)
file := File{
- Name: c.OSCommand.Unquote(filename),
+ Name: filename,
DisplayString: statusString,
HasStagedChanges: !includes([]string{" ", "U", "?"}, stagedChange),
HasUnstagedChanges: unstagedChange != " ",
Tracked: tracked,
Deleted: unstagedChange == "D" || stagedChange == "D",
HasMergeConflicts: change == "UU",
+ Type: c.OSCommand.FileType(filename),
}
files = append(files, file)
}