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

period shortcut for vscode.dev doesn't always open the same branch #171

Open
davidcorrigan714 opened this issue Nov 16, 2021 · 4 comments
Open

Comments

@davidcorrigan714
Copy link

davidcorrigan714 commented Nov 16, 2021

When using the period shortcut to go from an Azure DevOps Repo to vscode.dev it doesn't always open the right branch. I'd guess it's because Azure DevOps doesn't always have the branch name in the URL. I think Azure DevOps only adds the branch name to the URL when you change it in the UI or use a link that contains the branch. Otherwise it always opens to the last branch you were viewing but doesn't add that to the URL even if it's not the main or default branch for the repo.

@welcome
Copy link

welcome bot commented Nov 16, 2021

Thanks for opening your first issue here! Please refer to our support and troubleshooting docs.

@alejandro5042
Copy link
Owner

OK will look at this!

@alejandro5042
Copy link
Owner

Can you send me a link where it doesn't work if you press .?

@davidcorrigan714
Copy link
Author

It's not a specific link but it's easy enough to reproduce. Essentially whenever you navigate to the repo with the "Files" button it resets the query parameters in the URL but not the branch you're viewing. So to reproduce:

  1. Create a new branch in a repo
  2. Add a file in the root of the repo so you can tell which branch you're on in VSCode.dev. Also add some content to the file, seems like VSCode.dev has issues with empty files which I've reported to them.
  3. Click the "Files" button again to clear the URL.
  4. Hit . to open in VSCode.dev and you should end up in the main branch.
  5. Go back to AzDO.
  6. Change the branch with the drop down at the top, notice that it's in the URL now.
  7. Go to VSCode.dev with the period shortcut, notice you're now in the branch.

I really thought there was a way in the VSCode.dev UI to see what branch you're on, but couldn't find it this time so I used the new file trick to tell the difference. Curious if you see another way to tell what branch it has open.

The "Files" nav button I'm referring to above:
image

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

No branches or pull requests

2 participants