diff --git a/CHANGELOG.md b/CHANGELOG.md index 3876615..5ca06ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Removes `gitlens.theme.*` settings - now using built-in theme support ### Fixed +- Fixes [#211](https://github.com/eamodio/vscode-gitlens/issues/211) - Unsaved code lens appears on untracked files - Fixes issue where `Open * in Remote` commands are sometimes missing ## [6.1.2] - 2017-11-21 diff --git a/src/gitCodeLensProvider.ts b/src/gitCodeLensProvider.ts index 7f4d338..d04d9f8 100644 --- a/src/gitCodeLensProvider.ts +++ b/src/gitCodeLensProvider.ts @@ -67,6 +67,8 @@ export class GitCodeLensProvider implements CodeLensProvider { } async provideCodeLenses(document: TextDocument, token: CancellationToken): Promise { + if (!await this.git.isTracked(document.uri.fsPath)) return []; + const dirty = document.isDirty; const cfg = configuration.get(configuration.name('codeLens').value, document.uri);