add git refresh

This commit is contained in:
kyazdani42
2020-02-19 14:32:33 +01:00
parent c77a560a63
commit 1c4fb795fb
5 changed files with 30 additions and 5 deletions

View File

@@ -15,8 +15,14 @@ end
local GIT_STATUS = set_git_status()
local function refresh_git()
IS_GIT_REPO = is_git_repo()
if IS_GIT_REPO == false then return false end
GIT_STATUS = set_git_status()
return true
end
local function force_refresh_git()
IS_GIT_REPO = is_git_repo()
refresh_git()
end
local function is_folder_dirty(relpath)
@@ -54,4 +60,5 @@ end
return {
get_git_attr = get_git_attr;
refresh_git = refresh_git;
force_refresh_git = force_refresh_git;
}