@@ -187,9 +187,9 @@ function Explorer:expand(node)
187187end
188188
189189--- @param node DirectoryNode
190- --- @param git_status table | nil
190+ --- @param project GitProject ?
191191--- @return Node[] ?
192- function Explorer :reload (node , git_status )
192+ function Explorer :reload (node , project )
193193 local cwd = node .link_to or node .absolute_path
194194 local handle = vim .loop .fs_scandir (cwd )
195195 if not handle then
@@ -198,7 +198,7 @@ function Explorer:reload(node, git_status)
198198
199199 local profile = log .profile_start (" reload %s" , node .absolute_path )
200200
201- local filter_status = self .filters :prepare (git_status )
201+ local filter_status = self .filters :prepare (project )
202202
203203 if node .group_next then
204204 node .nodes = { node .group_next }
@@ -268,7 +268,7 @@ function Explorer:reload(node, git_status)
268268 end
269269
270270 node .nodes = vim .tbl_map (
271- self :update_status (nodes_by_path , node_ignored , git_status ),
271+ self :update_git_statuses (nodes_by_path , node_ignored , project ),
272272 vim .tbl_filter (function (n )
273273 if remain_childs [n .absolute_path ] then
274274 return remain_childs [n .absolute_path ]
@@ -282,7 +282,7 @@ function Explorer:reload(node, git_status)
282282 local single_child = node :single_child_directory ()
283283 if config .renderer .group_empty and node .parent and single_child then
284284 node .group_next = single_child
285- local ns = self :reload (single_child , git_status )
285+ local ns = self :reload (single_child , project )
286286 node .nodes = ns or {}
287287 log .profile_end (profile )
288288 return ns
@@ -331,19 +331,19 @@ end
331331--- @param node DirectoryNode
332332function Explorer :_load (node )
333333 local cwd = node .link_to or node .absolute_path
334- local git_status = git .load_project (cwd )
335- self :explore (node , git_status , self )
334+ local project = git .load_project (cwd )
335+ self :explore (node , project , self )
336336end
337337
338338--- @private
339339--- @param nodes_by_path Node[]
340340--- @param node_ignored boolean
341- --- @param status table | nil
341+ --- @param project GitProject ?
342342--- @return fun ( node : Node ): table
343- function Explorer :update_status (nodes_by_path , node_ignored , status )
343+ function Explorer :update_git_statuses (nodes_by_path , node_ignored , project )
344344 return function (node )
345345 if nodes_by_path [node .absolute_path ] then
346- node :update_git_status (node_ignored , status )
346+ node :update_git_status (node_ignored , project )
347347 end
348348 return node
349349 end
@@ -353,13 +353,13 @@ end
353353--- @param handle uv.uv_fs_t
354354--- @param cwd string
355355--- @param node DirectoryNode
356- --- @param git_status table
356+ --- @param project GitProject
357357--- @param parent Explorer
358- function Explorer :populate_children (handle , cwd , node , git_status , parent )
358+ function Explorer :populate_children (handle , cwd , node , project , parent )
359359 local node_ignored = node :is_git_ignored ()
360360 local nodes_by_path = utils .bool_record (node .nodes , " absolute_path" )
361361
362- local filter_status = parent .filters :prepare (git_status )
362+ local filter_status = parent .filters :prepare (project )
363363
364364 node .hidden_stats = vim .tbl_deep_extend (" force" , node .hidden_stats or {}, {
365365 git = 0 ,
@@ -388,7 +388,7 @@ function Explorer:populate_children(handle, cwd, node, git_status, parent)
388388 if child then
389389 table.insert (node .nodes , child )
390390 nodes_by_path [child .absolute_path ] = true
391- child :update_git_status (node_ignored , git_status )
391+ child :update_git_status (node_ignored , project )
392392 end
393393 else
394394 for reason , value in pairs (FILTER_REASON ) do
@@ -405,10 +405,10 @@ end
405405
406406--- @private
407407--- @param node DirectoryNode
408- --- @param status table
408+ --- @param project GitProject
409409--- @param parent Explorer
410410--- @return Node[] | nil
411- function Explorer :explore (node , status , parent )
411+ function Explorer :explore (node , project , parent )
412412 local cwd = node .link_to or node .absolute_path
413413 local handle = vim .loop .fs_scandir (cwd )
414414 if not handle then
@@ -417,15 +417,15 @@ function Explorer:explore(node, status, parent)
417417
418418 local profile = log .profile_start (" explore %s" , node .absolute_path )
419419
420- self :populate_children (handle , cwd , node , status , parent )
420+ self :populate_children (handle , cwd , node , project , parent )
421421
422422 local is_root = not node .parent
423423 local single_child = node :single_child_directory ()
424424 if config .renderer .group_empty and not is_root and single_child then
425425 local child_cwd = single_child .link_to or single_child .absolute_path
426- local child_status = git .load_project (child_cwd )
426+ local child_project = git .load_project (child_cwd )
427427 node .group_next = single_child
428- local ns = self :explore (single_child , child_status , parent )
428+ local ns = self :explore (single_child , child_project , parent )
429429 node .nodes = ns or {}
430430
431431 log .profile_end (profile )
@@ -440,7 +440,7 @@ function Explorer:explore(node, status, parent)
440440end
441441
442442--- @private
443- --- @param projects table
443+ --- @param projects GitProject[]
444444function Explorer :refresh_nodes (projects )
445445 Iterator .builder ({ self })
446446 :applier (function (n )
0 commit comments