Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Disallow nil passing to create_dirs() #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rbmarliere
Copy link

To tackle deletion and creation path issues, commit 6e1fa15 ("feat: Enable user to get "out" of a worktree") added the possibility of passing nil to change_dirs(). But the problems can be solved in a better way:

When deleting, check if the selection is the current tree then change dir to gitroot_dir() if so. When creating, add gitroot_dir() as prefix.

To tackle deletion and creation path issues, commit 6e1fa15 ("feat:
Enable user to get "out" of a worktree") added the possibility of passing
nil to change_dirs(). But the problems can be solved in a better way:

When deleting, check if the selection is the current tree then change dir
to gitroot_dir() if so. When creating, add gitroot_dir() as prefix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant