Skip to content

Commit 7c4b980

Browse files
authored
Merge pull request #160 from lambdalisue/imp-worktree
Automatically change the current working directory to the new worktree
2 parents 7ef9dfa + 22c6ee7 commit 7c4b980

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

denops/gin/action/worktree_new.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ async function doNew(
6767
worktreePath,
6868
target,
6969
]);
70+
// Change the current working directory to the new worktree
71+
await fn.chdir(denops, worktreePath);
7072
}
7173

7274
async function doNewOrphan(
@@ -92,6 +94,8 @@ async function doNewOrphan(
9294
"--orphan",
9395
worktreePath,
9496
]);
97+
// Change the current working directory to the new worktree
98+
await fn.chdir(denops, worktreePath);
9599
}
96100

97101
async function findRoot(

0 commit comments

Comments
 (0)