Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement git.untrackedChanges preference #11256

Merged

Conversation

colin-grant-work
Copy link
Contributor

@colin-grant-work colin-grant-work commented Jun 3, 2022

What it does

Fixes #11253 by implementing the git.untrackedChanges preference.

How to test

  1. Open a workspace in a git repository.
  2. Modify some files and add some files.
  3. Open the SCM view
  4. Test the values of the git.untrackedChanges preference:
    • if mixed, untracked and modified should be shown together, as they are on master.
    • if separate, untracked and modified should be shown separately.
    • if hidden, untracked files should not be shown in the SCM view.
  5. Test the preference values in both list and tree view modes of the SCM tree.
  6. Observe that the Stage All command now ignores untracked files unless git.untrackedFiles is set to mixed, and is disabled if there is nothing to stage.

Review checklist

Reminder for reviewers

@colin-grant-work colin-grant-work changed the title Implement scm.untrackedChanges preference Implement git.untrackedChanges preference Jun 3, 2022
@colin-grant-work colin-grant-work added preferences issues related to preferences git issues related to git labels Jun 3, 2022
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For transparency, I mentioned in an offline comment that it seems the individual toolbar items for the tree nodes in the scm view did not appear when the preference was set to separate:

git-separate

For comparison, the items are visible in vscode for the same preference value:

vscode-separate

@colin-grant-work
Copy link
Contributor Author

For transparency, I mentioned in an offline comment that it seems the individual toolbar items for the tree nodes in the scm view did not appear when the preference was set to separate:

Good catch. I have pushed a commit that updates the registrations for those actions to include the untracked section.

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes work well for me 👍

I confirmed that all three preference values work well, with different nested structures. Git operations on the nodes also work well and are properly handled by all three preference values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
git issues related to git preferences issues related to preferences
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Git: Improved untracked files management
2 participants