This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
Add filewatcher to config (remote origin change) #33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#27 Fix the issue where the extension wouldn't detect a local repository after being pushed to Team Services (the extension wouldn't initialize until VS Code was restarted).
The following are a series of steps that were used to test the fix/enhancement. Below is detailed what the expected behavior is when executed in this order. There are other sets of steps that would provide different behavior. Also, the behavior can change if there's no stored PAT yet (in the steps below, it is assumed that a valid PAT has already been stored for the Team Services accounts).
from a terminal, in an empty folder, and VS Code open with the TS extension installed,
git init
This command creates the git repo without a remote. The extension will recognize the newly created config file but it will not initialize. If the config file were to have a valid Team Services remote, it would initialize (like if someone copied-and-pasted a config file).
git remote add origin git@github.com:Microsoft/Git-Credential-Manager-for-Mac-and-Linux.git
The extension detects the changed config file but there's no apparent effect since it isn't a TS repo.
git remote set-url origin https://xxxxxxxxx.visualstudio.com/DefaultCollection/_git/DeepSpace
The extension detects the changed config file, and loads the TS info as expected.
git remote set-url origin https://yyyyy.visualstudio.com/DefaultCollection/VSOnline/_git/Content.Java
The extension detects the changed config file, and loads the TS info as expected.
git remote set-url origin https://yyyyy.visualstudio.com/VSOnline/_git/Java.VSCode.CredentialStore
The extension detects the changed config file, and loads the TS info as expected.
git remote set-url origin git@github.com:Microsoft/Git-Credential-Manager-for-Mac-and-Linux.git
The extension detects the changed config file, and uninitializes itself so no data is shown (since it is not a TS repo).
git remote set-url origin https://yyyyy.visualstudio.com/VSOnline/_git/Java.VSCode.CredentialStore
The extension detects the changed config file, and loads the TS info as expected.
delete the config file
If the file is deleted, the extension detects it, re-initializes and does not show any information.
If at any time PATs for the TS accounts aren't present, the behavior is what you would expect when no token is found (no token found message, etc.).