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

Fail to add tree if there are spaces in the path name #26

Closed totalolage closed 1 year ago

totalolage commented 1 year ago

My project folder has a space in the name ("Circularo app"), after creating a worktree through the command palette an error is displayed:

Error: Error: command: 'git -C /home/totalolage/Documents/Work/Thimble.cz/Circularo app/circularo-app/.git rev-parse --is-bare-repository'. error: 'Command failed: git -C /home/totalolage/Documents/Work/Thimble.cz/Circularo app/circularo-app/.git rev-parse --is-bare-repository fatal: cannot change to '/home/totalolage/Documents/Work/Thimble.cz/Circularo': No such file or directory '
alexiszamanidis commented 1 year ago

Hi @totalolage,

Thank you for bringing this issue to my attention. I appreciate your contribution and apologize for the delay in responding. I will review the issue in detail over the next few days and provide a response as soon as possible.

alexiszamanidis commented 1 year ago

Hi @totalolage,

I fixed the issue and tested it.

I would appreciate it if you could test the changes whenever you have some free time and provide me with your feedback.

Let me know if you have any questions or concerns.

Reference:

jonz94 commented 1 year ago

Hi @alexiszamanidis,

I just test the latest version v2.0.4 on Windows.

I created a folder at C:\Users\jonz94\repos\spaces in the path and tried to create a worktree through the command palette. Then, I got the following error:

Error: Error: command: 'git -C C:/Users/jonz94/repos/spaces\ in\ the\ path/.git rev-parse --is-bare-repository'.
error: Command failed: git -C C:/Users/jonz94/repos/spaces\ in\ the\ path/.git rev-parse --is-bare-repository
fatal: cannot change to 'C:/Users/jonz94/repos/spaces\': No such file or directory

I think the implementation might need some changes to make it work on Windows.

alexiszamanidis commented 1 year ago

Hi @jonz94,

Apologies for the delay.

Thank you once again for your invaluable contribution. Your solutions are always exceptional and provide a great learning experience.

I have tested and merged your fixes, and they work flawlessly. The latest version, v2.0.5, with your enhancements, has been published.

Thank you once again!