From f55d9e83d6fd54d108fb4198e55cdbcfd5dfa017 Mon Sep 17 00:00:00 2001 From: dervoeti Date: Fri, 17 Jan 2025 15:22:34 +0100 Subject: [PATCH] fix: patchable worktree initialization --- patchable.nu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patchable.nu b/patchable.nu index c10121a87..41d860ab5 100755 --- a/patchable.nu +++ b/patchable.nu @@ -80,9 +80,9 @@ def "main checkout" [ # $GIT_DIR must be the worktree's .git dir, even if that is just an alias for the backing repo, since each worktree maintains its own index $env.GIT_DIR = $"($worktree_path)/.git" $env.GIT_WORK_TREE = $worktree_path - let worktree_git_dir = git rev-parse --git-dir - let worktree_rebase_progress_dir = $"($worktree_git_dir)/rebase-apply" if ($worktree_path | path exists) { + let worktree_git_dir = git rev-parse --git-dir + let worktree_rebase_progress_dir = $"($worktree_git_dir)/rebase-apply" log info "Worktree root already exists, resetting" if ($worktree_rebase_progress_dir | path exists) { if $force {