Skip to content

Commit 4ee88df

Browse files
committed
Fix incorrect merge state in worktrees
1 parent f58191a commit 4ee88df

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

app/src/lib/helpers/git-dir.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ const getGitDirectoryBase = memoize((repository: Repository) => {
2424
// eslint-disable-next-line no-sync
2525
const contents = Fs.readFileSync(dotGit, 'utf8').trim()
2626
const gitDirPath = contents.replace(/^gitdir: /, '')
27-
return Path.join(repository.path, gitDirPath)
27+
if (Path.isAbsolute(gitDirPath)) {
28+
return gitDirPath
29+
} else {
30+
return Path.join(repository.path, gitDirPath)
31+
}
2832
} catch (e) {
2933
return dotGit
3034
}

0 commit comments

Comments
 (0)