diff --git a/modules/claude/worktree-create.sh b/modules/claude/worktree-create.sh index 5cc5537..14f38ac 100644 --- a/modules/claude/worktree-create.sh +++ b/modules/claude/worktree-create.sh @@ -1,8 +1,8 @@ # Runs under writeShellApplication (set -euo pipefail). Claude Code's # WorktreeCreate hook: it fully replaces the default `git worktree add`, so this -# script both places the worktree under ~/Code/worktrees// and copies -# local, gitignored config into it. The created path MUST be the last stdout -# line; all other output goes to stderr; any non-zero exit aborts creation. +# script places the worktree under ~/Code/worktrees//. The created +# path MUST be the last stdout line; all other output goes to stderr; any +# non-zero exit aborts creation. INPUT=$(cat) NAME=$(echo "$INPUT" | jq -r '.name') @@ -43,28 +43,4 @@ else git -C "$MAIN_ROOT" worktree add -b "$NAME" "$DEST" "$BASE_REF" >&2 fi -# Carry uncommitted local config from the main checkout, if present. -CARRY=(devenv.nix devenv.yaml devenv.lock devenv.local.nix .envrc .env) -for item in "${CARRY[@]}"; do - src="$MAIN_ROOT/$item" - if [ -e "$src" ]; then - cp -R "$src" "$DEST/$item" >&2 - fi -done - -for src in "$MAIN_ROOT"/secretspec*; do - if [ -e "$src" ]; then - cp -R "$src" "$DEST/$(basename "$src")" >&2 - fi -done - -if [ -d "$MAIN_ROOT/.claude" ]; then - mkdir -p "$DEST/.claude" - for src in "$MAIN_ROOT/.claude"/*; do - if [ -e "$src" ]; then - cp -R "$src" "$DEST/.claude/" >&2 - fi - done -fi - echo "$DEST" diff --git a/modules/fish.nix b/modules/fish.nix index 58c57e9..a98cbac 100644 --- a/modules/fish.nix +++ b/modules/fish.nix @@ -97,27 +97,6 @@ git -C "$main_root" worktree add -b "$branch" "$dest" "$base_ref"; or return end - for item in .envrc .env devenv.nix devenv.yaml devenv.lock devenv.local.nix - if test -e "$main_root/$item" - cp -R "$main_root/$item" "$dest/$item" - end - end - - for src in "$main_root"/secretspec* - if test -e "$src" - cp -R "$src" "$dest/"(basename "$src") - end - end - - if test -d "$main_root/.claude" - mkdir -p "$dest/.claude" - for src in "$main_root/.claude"/* - if test -e "$src" - cp -R "$src" "$dest/.claude/" - end - end - end - cd "$dest" '';