Skip to content
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

Merged
merged 1 commit into from
Jul 28, 2016
Merged

Conversation

jeffyoung
Copy link
Contributor

#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.).

#27 Fix the issue where the extension wouldn't detect that a local repository, after being pushed to Team Services, and not initialize until VS Code was restarted.
@davidstaheli
Copy link
Contributor

Looks good to me.

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.

None yet

3 participants