-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Git: File events don't work if .git is outside the opened folder #41085
Comments
I looked at the git extension source code and noticed in This explains why the status is never updated. |
Question: couldn't the problem simply be that the fileSystemWatcher only listens for file changes inside the workspace (ie: in this example, only in If I create and switch to a new branch with Now, most of the time, switching branches will change at least one file inside the workspace, but not when creating new branch, so this would explain why it works in most cases. |
I now know how to easily reproduce it, with the following folder structure:
Opening the In this case VSCode will detect the git repository found in foo's parent directory but will only listen for file changes inside the Creating a new branch, or changing a branch with no changes (eg. |
Yup. @jrieken @bpasero This happens because the |
Exposing this in the API is easy ;-) |
@joaomoreno not easy without a reliable watcher, but we have #3025 for it already. |
Well this is really just a duplicate of #3025, which I failed to find in my search efforts. |
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines. Happy Coding! |
The following bug only seems to happen when two folders belonging to the same parent git repository are added to the workspace. For example, here myApp is the repository:
Steps to Reproduce:
foo
folder to the workspacebar
folder to the workspacegit checkout -b new_branch
What happens?
The branch sticks to
master
in the bottom left corner of vscode.Note: Exiting VSCode and opening the previous workspace will correctly show the new_branch as current branch.
Reproduces without extensions: Yes
edit:
Problem also happens with macOS High Sierra. See my last comment.
The text was updated successfully, but these errors were encountered: