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

SCM Working Sets: Creating a new branch restores old working set if identically named branch existed in the past #238442

Open
SimonHeybrock opened this issue Jan 22, 2025 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality scm General SCM compound issues

Comments

@SimonHeybrock
Copy link

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.96.3
  • OS Version: Mac & Linux

Steps to Reproduce:

In the settings, set scm.workingSets.enabled to true and sc.workingSets.default to "current". Then

git switch main  # close all editors
git checkout -b abc  # now open a file
git switch main  # VScode closes editors if SCM>Working Sets is enabled
git branch -D abc
# <time passes>
git checkout -b abc  # Unexpected behavior: Restores editor from step 2!

Expected behavior:

I would have expected to restore state only when switching branches, not when creating new branches. It seems VScode erroneously detects git checkout -b as a branch switch instead of a new branch creation if a branch of the same name existed in the past?

Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.96.4. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@lszomoru lszomoru added scm General SCM compound issues feature-request Request for new features or functionality labels Jan 22, 2025
@vs-code-engineering vs-code-engineering bot added this to the Backlog Candidates milestone Jan 22, 2025
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@gjsjohnmurray
Copy link
Contributor

Perhaps the Git: Delete Branch... command should also delete the associated local storage of the branch's working set data. It wouldn't solve the OP's issue though because their branch delete was done at the command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality scm General SCM compound issues
Projects
None yet
Development

No branches or pull requests

3 participants