Skip to content

Commit 7899610

Browse files
committed
feat: Pass worktree_path to Create hook ThePrimeagen#103
From <ThePrimeagen#103>
2 parents dd3c09e + 99b2ae6 commit 7899610

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lua/git-worktree/init.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,15 +377,15 @@ local function create_worktree(path, branch, upstream, found_branch)
377377
end
378378

379379
vim.schedule(function()
380-
emit_on_change(Enum.Operations.Create, {path = path, branch = branch, upstream = upstream})
381-
M.switch_worktree(path)
380+
emit_on_change(Enum.Operations.Create, {path = worktree_path, branch = branch, upstream = upstream})
381+
M.switch_worktree(worktree_path)
382382
end)
383383
end)
384384
else
385385
create:after(function()
386386
vim.schedule(function()
387-
emit_on_change(Enum.Operations.Create, {path = path, branch = branch, upstream = upstream})
388-
M.switch_worktree(path)
387+
emit_on_change(Enum.Operations.Create, {path = worktree_path, branch = branch, upstream = upstream})
388+
M.switch_worktree(worktree_path)
389389
end)
390390
end)
391391
end

0 commit comments

Comments
 (0)