Skip to content

Commit fc00cc8

Browse files
authored
Merge pull request #2680 from daxgames/fix_git_worktree
Fix git worktree
2 parents 0616ff0 + 0dd2a66 commit fc00cc8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Diff for: CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## [Unreleased](https://ci.appveyor.com/project/MartiUK/cmder/build/artifacts) (2022-03-17)
4+
5+
### Changes
6+
7+
- Fix Git prompt branch when using Git worktree.
8+
39
## [1.3.19](https://github.com/cmderdev/cmder/tree/v1.3.19) (2022-01-15)
410

511
### Changes

Diff for: vendor/clink.lua

+6
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,12 @@ local function get_git_dir(path)
256256
local git_dir = gitfile:read():match('gitdir: (.*)')
257257
gitfile:close()
258258

259+
if os.isdir then -- only available in Clink v1.0.0 and higher
260+
if git_dir and os.isdir(git_dir) then
261+
return git_dir
262+
end
263+
end
264+
259265
return git_dir and dir..'/'..git_dir
260266
end
261267

0 commit comments

Comments
 (0)