fix: harden git status updates (#2533)
* fix for nil status error messages * simplify logic --------- Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
@@ -14,13 +14,15 @@ local function get_dir_git_status(parent_ignored, status, absolute_path)
|
|||||||
return { file = "!!" }
|
return { file = "!!" }
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
if status then
|
||||||
file = status.files and status.files[absolute_path],
|
return {
|
||||||
dir = status.dirs and {
|
file = status.files and status.files[absolute_path],
|
||||||
direct = status.dirs.direct[absolute_path],
|
dir = status.dirs and {
|
||||||
indirect = status.dirs.indirect[absolute_path],
|
direct = status.dirs.direct[absolute_path],
|
||||||
},
|
indirect = status.dirs.indirect[absolute_path],
|
||||||
}
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function get_git_status(parent_ignored, status, absolute_path)
|
local function get_git_status(parent_ignored, status, absolute_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user