gitkraken / vscode-gitlens

Supercharge Git inside VS Code and unlock untapped knowledge within each repository — Visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more
http://gitkraken.com/gitlens
Other
9.04k stars 1.35k forks source link

Change how GitLens runs certain Git commands (e.g. avoid using the terminal) #3527

Open eamodio opened 2 months ago

eamodio commented 2 months ago

Currently GitLens falls back to terminal execution for certain git commands. It was mainly done out of convenience to avoid needing to handle many error cases, but also so that the user could easily tweak the command and execute it again themselves.

We should replace those terminal-run command with custom command like all our other Git commands, though it could still be really nice to offer to open the terminal with the command as an option/button on an error dialog/notification if the user chooses.

Can find all the commands that call this:

https://github.com/gitkraken/vscode-gitlens/blob/d9a9718e84c2dfb1eccd4130b4289eaace79427c/src/env/node/git/git.ts#L2192

Which really boils down to callers of:

https://github.com/gitkraken/vscode-gitlens/blob/ac7c7271d589425f40715f41d912baecc68f23b4/src/git/models/repository.ts#L1289-L1293

### Tasks
- [ ] #3528
- [ ] #3529
- [ ] #3533
- [ ] #3530
- [ ] #3531
- [ ] #3532
- [ ] #3534

This will ultimately resolve: #3364, #2889, #2664, #2607, #2541, #2444, #2312, #2057, #1901, #1450, #732, #3364, #1767

lishaduck commented 2 months ago

This sounds really nice! I assume this was prompted by the VSCode August 2024 release by the filing date, so please disregard this if so, but if not, I'd really love it if the fallback used VSCode's new Terminal shell integration API, as my shell starts up slowly and GitLens's not waiting for the prompt always messes with me :)

Thanks for GitLens! I use it everyday, the commit graph is amazing.