alexiszamanidis / vscode-git-worktrees

A VS Code extension that wraps git worktree operations for simplicity and productivity
https://marketplace.visualstudio.com/items?itemName=GitWorktrees.git-worktrees
MIT License
44 stars 5 forks source link

Windows support #3

Closed assignUser closed 2 years ago

assignUser commented 2 years ago

Due to your use of awk here adding a tree fails on windows. One possible solution would be use the git-bash that comes with awk.

Aside from the bug, should the extension even remove branches unasked?

assignUser commented 2 years ago

same issue here https://github.com/alexiszamanidis/vscode-git-worktrees/blob/8b838de0341b36fa1bdb1a908742a4e4ac3bf4b5/src/helpers/gitHelpers.ts#L58

alexiszamanidis commented 2 years ago

In my opinion, WSL is established on Windows. Have you tried it with WSL? Do you think this is a solution for Windows or would it be better to move on to what you suggested?

Branches deleted without asking the user are stalled. This means that these branches are deleted remotely, but are available locally.

assignUser commented 2 years ago

Well yes it works in wsl but that is linux so I could not use it for windows development. It would be possible to use wsl to solve this via prefixing the linux commands like this wsl awk.

Sure I think this is still a choice the user should be aware of and have the possibility of turning off. After all the command is "add a new worktree" not "add a new worktree and clean up branches"

I also want to thank you for the extension as it works quite well (on linux :P)!

jonz94 commented 2 years ago

Hi Alexis, I just open a PR to add Windows support for this extension. If you have some free time, please take a look. ☺️

alexiszamanidis commented 2 years ago

Hi jonz94, I reviewed your PR and your solution seems neat. I will proceed with the merge and the publish of the improvement.

Thank you both for your time and contribution!