fix: worktree created in wrong directory (issue #185) #186

Merged
shoko merged 1 commits from fix/issue-185-worktree-wrong-directory into main 2026-04-06 07:33:03 +02:00
Owner

Summary

Fixed kugetsu start creating worktrees in the daemon's working directory ($PWD) instead of ~/.kugetsu-worktrees/.

Bug

cmd_start() called create_worktree "$issue_ref" without passing $WORKTREES_DIR as the second argument. The create_worktree() function defaults to $PWD when parent_dir is not specified.

Fix

Changed create_worktree "$issue_ref" to create_worktree "$issue_ref" "$WORKTREES_DIR" at line 249.

Changes

  • kugetsu-session.sh:249: Pass $WORKTREES_DIR to create_worktree()
## Summary Fixed `kugetsu start` creating worktrees in the daemon's working directory (`$PWD`) instead of `~/.kugetsu-worktrees/`. ## Bug `cmd_start()` called `create_worktree "$issue_ref"` without passing `$WORKTREES_DIR` as the second argument. The `create_worktree()` function defaults to `$PWD` when `parent_dir` is not specified. ## Fix Changed `create_worktree "$issue_ref"` to `create_worktree "$issue_ref" "$WORKTREES_DIR"` at line 249. ## Changes - `kugetsu-session.sh:249`: Pass `$WORKTREES_DIR` to `create_worktree()`
shoko added 1 commit 2026-04-06 07:18:45 +02:00
cmd_start was calling create_worktree without passing $WORKTREES_DIR,
causing worktrees to be created in $PWD (daemon's working directory)
instead of ~/.kugetsu-worktrees/
han approved these changes 2026-04-06 07:21:01 +02:00
han left a comment
First-time contributor

lgtm

lgtm
shoko merged commit 383f538438 into main 2026-04-06 07:33:03 +02:00
Sign in to join this conversation.