andy-5 / wslgit

Use Git installed in Bash on Windows/Windows Subsystem for Linux (WSL) from Windows and Visual Studio Code (VSCode)
MIT License
1.18k stars 59 forks source link

Smart interactive #87

Closed carlolars closed 4 years ago

carlolars commented 4 years ago

When I implemented the benchmarks in #86 then I realized how much slower it was to use interactive mode versus non-interactive. I'm using an ssh-agent so I have to use interactive mode.

But it is not all git commands that needs the ssh-agent, just those who access remotes (clone, fetch, pull and push afaik). So I implemented a smart option for WSLGIT_USE_INTERACTIVE_SHELL that use interactive mode for just those commands. And why not make it the default.

I also made wslgit share one environmental variable named WSLGIT to WSL which I use in my .bashrc to do the bare minimum of initialization for git to work.

My GUI tools that use wslgit feels a lot snappier now, and still use the ssh-agent for remote access :)

andy-5 commented 4 years ago

That's a great idea! I also think that defaulting to smart is the best option. Nice work.