Skip to content

Git: Ignore untracked files in change count badge - #10448

Merged
João Moreno (joaomoreno) merged 2 commits into
microsoft:masterfrom
FabianLauer:git-untracked-files
Aug 12, 2016
Merged

João Moreno (joaomoreno) merged 2 commits into
microsoft:masterfrom
FabianLauer:git-untracked-files

Conversation

@FabianLauer

Copy link
Copy Markdown

This PR implements avih (@avih)'s the feature-request from issue #10268.

What has changed?

  • new configuration setting git.countUntracked, default is false
  • the blue 'change count badge' on the git icon in the main sidebar ignores untracked files if git.countUntracked is true

New Configuration Setting

The new setting does not affect the default behaviour of the change count badge as it is off by default, meaning both tracked and untracked files are counted. Untracked files are only ignored if git.countUntracked is set to true in the user or workspace preferences.

Other Changes to gitWorkbenchContribution.ts

  • import IConfigurationService in order to read the countUntracked config
  • in StatusUpdater: add private member configurationService
  • in StatusUpdater.showChangesBadge(): use a different callback for map depending on countUntracked

In Action

git-ignore-untracked 1

@msftclas

Hi Fabian Lauer (@FabianLauer), I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;

@joaomoreno

Copy link
Copy Markdown
Contributor

Thanks! Changed the setting to:

'git.countBadge': {
    type: 'string',
    enum: ['all', 'tracked', 'off'],
    default: 'all',
    description: nls.localize('countBadge', "Controls the git badge counter."),
}

@avih

avih (avih) commented Apr 6, 2017 •

Copy link
Copy Markdown

This seems to have broken with vscode 1.11.0 (was working in 1.10.2).

It now always works as if git.countBadge is set to all, regardless of any actual value it's set to (specifically, tracked and off are not respected).

@joaomoreno

Copy link
Copy Markdown
Contributor

avih (@avih) Created #24026

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants