fix prompt branch for git worktree

This commit is contained in:
dgames 2022-03-17 07:57:48 -04:00
parent 0616ff0a82
commit 6189f4f0e6

6
vendor/clink.lua vendored
View File

@ -256,6 +256,12 @@ local function get_git_dir(path)
local git_dir = gitfile:read():match('gitdir: (.*)')
gitfile:close()
if os.isdir then -- only available in Clink v1.0.0 and higher
if git_dir and os.isdir(git_dir) then
return git_dir
end
end
return git_dir and dir..'/'..git_dir
end