coding style

This commit is contained in:
chomosuke
2022-11-30 03:35:00 +11:00
parent a2c75567ad
commit 5736db5db3
2 changed files with 44 additions and 63 deletions

View File

@@ -22,20 +22,19 @@ function M.has_one_child_folder(node)
end
function M.update_git_status(node, parent_ignored, status)
-- status of the node's absolute path
local get_status
if node.nodes then
node.git_status = get_dir_git_status(parent_ignored, status, node.absolute_path)
get_status = get_dir_git_status
else
node.git_status = get_git_status(parent_ignored, status, node.absolute_path)
get_status = get_git_status
end
-- status of the node's absolute path
node.git_status = get_status(parent_ignored, status, node.absolute_path)
-- status of the link target, if the link itself is not dirty
if node.link_to and not node.git_status then
if node.nodes then
node.git_status = get_dir_git_status(parent_ignored, status, node.link_to)
else
node.git_status = get_git_status(parent_ignored, status, node.link_to)
end
node.git_status = get_status(parent_ignored, status, node.link_to)
end
end