49
49
50
50
M .mark_ignored = function (state , items )
51
51
local git_roots = {}
52
+ log .trace (" ================================================================================" )
53
+ log .trace (" IGNORED: mark_ignore BEGIN..." )
52
54
for _ , item in ipairs (items ) do
53
55
local root = get_root_for_item (item )
54
56
if root then
@@ -65,6 +67,7 @@ M.mark_ignored = function(state, items)
65
67
for _ , item in ipairs (repo_items ) do
66
68
table.insert (cmd , item )
67
69
end
70
+ log .trace (" IGNORED: Running cmd: " , cmd )
68
71
local result = vim .fn .systemlist (cmd )
69
72
if vim .v .shell_error == 128 then
70
73
if type (result ) == " table" then
@@ -80,6 +83,7 @@ M.mark_ignored = function(state, items)
80
83
81
84
-- check-ignore does not indicate directories the same as 'status' so we need to
82
85
-- add the trailing slash to the path manually.
86
+ log .trace (" IGNORED: Checking types of" , # result , " items to see which ones are directories" )
83
87
for i , item in ipairs (result ) do
84
88
local stat = vim .loop .fs_stat (item )
85
89
if stat and stat .type == " directory" then
@@ -89,14 +93,19 @@ M.mark_ignored = function(state, items)
89
93
vim .list_extend (all_results , result )
90
94
end
91
95
92
-
96
+ log .trace (" IGNORED: Comparing results to mark items as ignored" )
97
+ local ignored , not_ignored = 0 , 0
93
98
for _ , item in ipairs (items ) do
94
99
if M .is_ignored (all_results , item .path , item .type ) then
95
100
item .filtered_by = item .filtered_by or {}
96
101
item .filtered_by .gitignored = true
102
+ ignored = ignored + 1
103
+ else
104
+ not_ignored = not_ignored + 1
97
105
end
98
106
end
99
-
107
+ log .trace (" IGNORED: mark_ignored is complete, ignored:" , ignored , " , not ignored:" , not_ignored )
108
+ log .trace (" ================================================================================" )
100
109
return all_results
101
110
end
102
111
0 commit comments