summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git_commands/working_tree.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/commands/git_commands/working_tree.go')
-rw-r--r--pkg/commands/git_commands/working_tree.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/commands/git_commands/working_tree.go b/pkg/commands/git_commands/working_tree.go
index 8fd1fb177..9c02d4300 100644
--- a/pkg/commands/git_commands/working_tree.go
+++ b/pkg/commands/git_commands/working_tree.go
@@ -241,7 +241,7 @@ func (self *WorkingTreeCommands) WorktreeFileDiffCmdObj(node models.IFile, plain
if cached {
cachedArg = " --cached"
}
- if !node.GetIsTracked() && !node.GetHasStagedChanges() && !cached {
+ if !node.GetIsTracked() && !node.GetHasStagedChanges() && !cached && node.GetIsFile() {
trackedArg = "--no-index -- /dev/null"
}
if plain {