From 3e3104973cc1841a3dd6a5e2f08cb09ee4cb4b6c Mon Sep 17 00:00:00 2001 From: Ramin Tadayon Date: Wed, 7 Sep 2022 16:24:20 +0900 Subject: [PATCH] Include detached HEAD as local ref --- src/env/node/git/localGitProvider.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/env/node/git/localGitProvider.ts b/src/env/node/git/localGitProvider.ts index 89e7808..75017d4 100644 --- a/src/env/node/git/localGitProvider.ts +++ b/src/env/node/git/localGitProvider.ts @@ -1756,7 +1756,7 @@ export class LocalGitProvider implements GitProvider, Disposable { if (commit.tips) { for (let tip of commit.tips.split(', ')) { - if (tip === 'refs/stash' || tip === 'HEAD') continue; + if (tip === 'refs/stash') continue; if (tip.startsWith('tag: ')) { refTags.push({ @@ -1768,8 +1768,8 @@ export class LocalGitProvider implements GitProvider, Disposable { continue; } - current = tip.startsWith('HEAD -> '); - if (current) { + current = tip.startsWith('HEAD'); + if (current && tip !== 'HEAD') { tip = tip.substring(8); }