Describe the bug
When creating a new worktree and entering its path (i.e. ~/path/to/worktree or ../worktree-name), those path segments (~, ..) do not expand because they are normally expanded automatically by the terminal (afaik) and instead a directory at /path/to/repository/~/path/to/worktree is created.
To Reproduce
Steps to reproduce the behavior:
- Open a repository by running "lazygit" when pwd is a git repository
- Activate Worktrees tab by typing 2 then ]
- Choose "New worktree" by typing n
- Choose "Create worktree from ref"
- Choose a base ref (I recommend using your current checked out ref)
- Enter a worktree path that begins with ".." or "~", and submit
- Enter a new branch name (I recommend
test/worktree-creation)
- Take note of the new Worktree -> Path relative to the Worktree -> Path when using the arrow key select your previous checked-out worktree
Expected behavior
A clear and concise description of what you expected to happen.
I expect ".." and "~" to expand as they would if I ran the command in my terminal directly, and the worktree to be created accordingly
Screenshots
If applicable, add screenshots to help explain your problem.
Version info:
Run lazygit --version and paste the result here
commit=, build date=, build source=Homebrew, version=0.53.0, os=darwin, arch=arm64, git version=2.39.5 (Apple Git-154)
Run git --version and paste the result here
git version 2.39.5 (Apple Git-154)
Additional context
Add any other context about the problem here.
None to share
Note: please try updating to the latest version or manually building the latest master to see if the issue still occurs.
Describe the bug
When creating a new worktree and entering its path (i.e. ~/path/to/worktree or ../worktree-name), those path segments (
~,..) do not expand because they are normally expanded automatically by the terminal (afaik) and instead a directory at/path/to/repository/~/path/to/worktreeis created.To Reproduce
Steps to reproduce the behavior:
test/worktree-creation)Expected behavior
A clear and concise description of what you expected to happen.
I expect ".." and "~" to expand as they would if I ran the command in my terminal directly, and the worktree to be created accordingly
Screenshots
If applicable, add screenshots to help explain your problem.
Version info:
Run
lazygit --versionand paste the result herecommit=, build date=, build source=Homebrew, version=0.53.0, os=darwin, arch=arm64, git version=2.39.5 (Apple Git-154)
Run
git --versionand paste the result heregit version 2.39.5 (Apple Git-154)
Additional context
Add any other context about the problem here.
None to share
Note: please try updating to the latest version or manually building the latest
masterto see if the issue still occurs.