Skip to content

Commit a2bc01a

Browse files
authored
fix: patchable worktree initialization (#977)
1 parent 3be52d4 commit a2bc01a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

patchable.nu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ def "main checkout" [
8080
# $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
8181
$env.GIT_DIR = $"($worktree_path)/.git"
8282
$env.GIT_WORK_TREE = $worktree_path
83-
let worktree_git_dir = git rev-parse --git-dir
84-
let worktree_rebase_progress_dir = $"($worktree_git_dir)/rebase-apply"
8583
if ($worktree_path | path exists) {
84+
let worktree_git_dir = git rev-parse --git-dir
85+
let worktree_rebase_progress_dir = $"($worktree_git_dir)/rebase-apply"
8686
log info "Worktree root already exists, resetting"
8787
if ($worktree_rebase_progress_dir | path exists) {
8888
if $force {

0 commit comments

Comments
 (0)