mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 09:49:12 +08:00
Merge pull request #2680 from daxgames/fix_git_worktree
Fix git worktree
This commit is contained in:
commit
fc00cc8be2
@ -1,5 +1,11 @@
|
||||
# Change Log
|
||||
|
||||
## [Unreleased](https://ci.appveyor.com/project/MartiUK/cmder/build/artifacts) (2022-03-17)
|
||||
|
||||
### Changes
|
||||
|
||||
- Fix Git prompt branch when using Git worktree.
|
||||
|
||||
## [1.3.19](https://github.com/cmderdev/cmder/tree/v1.3.19) (2022-01-15)
|
||||
|
||||
### Changes
|
||||
|
6
vendor/clink.lua
vendored
6
vendor/clink.lua
vendored
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user