@@ -5,27 +5,13 @@ local M = {
5
5
is_windows = vim .fn .has " win32" == 1 ,
6
6
}
7
7
8
- function M .get_dir_git_status (parent_ignored , status , absolute_path )
9
- if parent_ignored then
10
- return " !!"
11
- end
12
- local dir_status = status .dirs and status .dirs [absolute_path ]
13
- local file_status = status .files and status .files [absolute_path ]
14
- return dir_status or file_status
15
- end
16
-
17
- function M .get_git_status (parent_ignored , status , absolute_path )
18
- return parent_ignored and " !!" or status .files and status .files [absolute_path ]
19
- end
20
-
21
- function M .folder (parent , absolute_path , name , status , parent_ignored )
8
+ function M .folder (parent , absolute_path , name )
22
9
local handle = uv .fs_scandir (absolute_path )
23
10
local has_children = handle and uv .fs_scandir_next (handle ) ~= nil
24
11
25
12
return {
26
13
absolute_path = absolute_path ,
27
14
fs_stat = uv .fs_stat (absolute_path ),
28
- git_status = M .get_dir_git_status (parent_ignored , status , absolute_path ),
29
15
group_next = nil , -- If node is grouped, this points to the next child dir/link node
30
16
has_children = has_children ,
31
17
name = name ,
@@ -42,15 +28,14 @@ local function is_executable(absolute_path, ext)
42
28
return uv .fs_access (absolute_path , " X" )
43
29
end
44
30
45
- function M .file (parent , absolute_path , name , status , parent_ignored )
31
+ function M .file (parent , absolute_path , name )
46
32
local ext = string.match (name , " .?[^.]+%.(.*)" ) or " "
47
33
48
34
return {
49
35
absolute_path = absolute_path ,
50
36
executable = is_executable (absolute_path , ext ),
51
37
extension = ext ,
52
38
fs_stat = uv .fs_stat (absolute_path ),
53
- git_status = M .get_git_status (parent_ignored , status , absolute_path ),
54
39
name = name ,
55
40
parent = parent ,
56
41
}
61
46
-- links (for instance libr2.so in /usr/lib) and thus even with a C program realpath fails
62
47
-- when it has no real reason to. Maybe there is a reason, but errno is definitely wrong.
63
48
-- So we need to check for link_to ~= nil when adding new links to the main tree
64
- function M .link (parent , absolute_path , name , status , parent_ignored )
49
+ function M .link (parent , absolute_path , name )
65
50
--- I dont know if this is needed, because in my understanding, there isnt hard links in windows, but just to be sure i changed it.
66
51
local link_to = uv .fs_realpath (absolute_path )
67
52
local open , nodes , has_children
@@ -75,7 +60,6 @@ function M.link(parent, absolute_path, name, status, parent_ignored)
75
60
return {
76
61
absolute_path = absolute_path ,
77
62
fs_stat = uv .fs_stat (absolute_path ),
78
- git_status = M .get_git_status (parent_ignored , status , absolute_path ),
79
63
group_next = nil , -- If node is grouped, this points to the next child dir/link node
80
64
has_children = has_children ,
81
65
link_to = link_to ,
0 commit comments