Closed StyxTheGrumpy closed 4 years ago
Thanks for the suggestion, sounds indeed useful.
Looks like this information is exposed by VS Code's built-in git extension API: https://github.com/microsoft/vscode/blob/cc2a8dc1774e5f09bd8ff066c6d0d64bf0403494/extensions/git/src/api/git.d.ts#L114
Since you can select multiple repos (with shift key) at the same time I would have to add some logic that picks one of them. I guess showing the diff for the first one is good enough in that case.
I did a first implementation of it under a new option (disabled by default). However, there is an issue in VS Code itself where the change in selection only gets active when certain UI elements are clicked. It's not enough just selecting a repo in the "Source Control Repositories" view. Let's hope that gets fixed.
Just pushed a new version with this feature, you can enable it with a new option. Let me know how that works for you. I still think VS Code has to be improved to really make it nice to use.
Getting errors from the new version. It doesnt show any contents, the change repository option presents an empty list to select from and I'm getting error messages like "Updating the git tree failed: The "path" argument must be of type string. Received type undefined"
Doesnt seem to matter if I turn off the experimental option in settings
Can you verify that this happens only with the latest version? You can install the old version using the cog wheel in the extensions tab.
Looks like I may have a bigger issue.
Same problem with older versions. (It has been a good while since I cranked up my dev tools on my home pc so it’s probably something other than the extension)
Another new error message from git tree compare though, “Changing the repository failed: Could not find any workspace folder for e:\myrepofolderhere"
From: Maik Riechert notifications@github.com Sent: 04 October 2020 11:16 To: letmaik/vscode-git-tree-compare vscode-git-tree-compare@noreply.github.com Cc: Paul Molloy paul@molloy.me; Author author@noreply.github.com Subject: Re: [letmaik/vscode-git-tree-compare] Change repository when selected repository changes (#70)
Can you verify that this happens only with the latest version? You can install the old version using the cog wheel in the extensions tab.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/letmaik/vscode-git-tree-compare/issues/70#issuecomment-703233454 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AEZFQCS4AA6WHVDSK2NUMWTSJBDO5ANCNFSM4SBK7GSA . https://github.com/notifications/beacon/AEZFQCRLQXNJM3NSJU4BBVLSJBDO5A5CNFSM4SBK7GSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFHVH3LQ.gif
Strange. Which VS Code and git version are you using? Also, can you copy the log output from "Output" -> Git Tree Compare?
Using freshly updated 1.50.0 VSCode and 2.28.0.windows.1 git Works perfectly at work, but they are a few VSCode versions behind. Git appears to be working ok, but git tree compare cant find the reposiitories
The git tree compare output is just "Using git from C:\Program Files\Git\cmd\git.exe" and a series of "ignoring irrelevant change: e:\folder.git\file"
Huh. This is weird, on a hunch I moved my repos and tried again. It looks like the extension doesnt like repositories in the drive root, e.g. It works if my repositories are "E:\folder\repofolder" but not if it's just "E:\RepoFolder"
Weird, I just tried with a folder in the drive root but it worked for me.
I routinely use multiple repositories in one workspace and when I select a new repository in the source control providers tab, the list of changes automatically switches to the new repository, but git tree compare doesn't. This can make for some small confusion and means I have to keep manually hitting the change repository button.
I'd like to suggest that, if possible, it could listen for the repository changing and update itself accordingly.
Love the extension. Super useful.