Match branches with worktrees always, even with slashes

This commit is contained in:
2022-06-17 01:44:47 +02:00
parent d18c49982e
commit c56765ce26
3 changed files with 83 additions and 27 deletions

View File

@@ -222,7 +222,7 @@ fn sync_repo(root_path: &Path, repo: &repo::Repo, init_worktree: bool) -> Result
if newly_created && repo.worktree_setup && init_worktree {
match repo_handle.default_branch() {
Ok(branch) => {
worktree::add_worktree(&repo_path, &branch.name()?, None, None, false)?;
worktree::add_worktree(&repo_path, &branch.name()?, None, false)?;
}
Err(_error) => print_repo_error(
&repo.name,