# Release v0.1.2 ## 🎉 New Features ### Recursive directory copying in `copy_files` (#113, #123) A `copy_files` entry that matches a directory now copies the directory recursively, instead of being ignored. This makes it easy to share untracked tool directories with every new worktree: ```toml [[repository_settings]] repository = "~/src/myproject" copy_files = [".claude", ".env", "config/*.json"] ``` Copying follows these rules: - `.git` entries are never copied, including the `.git` of a nested repository inside a copied directory. - Symlinked files are copied as regular files. Symlinked directories are skipped with a warning unless an entry names them literally; `**` never traverses them. - Each file is copied at most once, even when several patterns match it. - When the worktree base directory lives inside the repository (e.g. `basedir = "./worktrees"`), the new worktree is never copied into itself, including through a symlink to the base directory. - New files get the source file's permissions, subject to the umask, so executable scripts stay executable. ### Faster global discovery (#118, #120) Commands that use `-g` (`list`, `status`, `get`, `exec`, `remove`) no longer walk into the contents of linked worktrees and run their per-worktree `git` calls in parallel. With a worktree containing a large `node_modules`, `gwq list -g` dropped from about 6s to 0.2s. Worktrees of a `.bare` layout (`/.bare` with `/.git` pointing at it) are still discovered. ## 🐛 Bug Fixes - Resolve the root of a bare repository to the bare directory itself, so `repository_settings` match bare repositories from both the bare directory and its linked worktrees. Bare clones into `/.git` and `.bare` layouts still resolve to `` (#116, #121) - Mark the bare repository entry as main in `gwq list`, so `gwq remove` never offers it (#121) - Skip `copy_files` with a warning for a bare repository, which has no working tree to copy from (#121) - Never let `copy_files` truncate a source file that the destination already points at (e.g. a tracked absolute symlink into the main checkout), or overwrite the new worktree's `.git` file (e.g. with the `/.git` pointer of a `.bare` layout) (#122) ## ⚠️ Breaking Changes 1. `-g` commands no longer list repositories or worktrees nested inside a linked worktree, or inside a checkout whose `.git` file points elsewhere (separate git dir, stale pointer). 2. For a plain bare repository (e.g. `~/src/myproject.git`), the repository root is now the bare directory instead of its parent. Point `repository_settings.repository` at the bare directory. 3. `copy_files` patterns that match directories (e.g. `*`) now copy them recursively. Review broad patterns so they do not copy large directories such as `node_modules`. ## 👥 Contributors - @chris-monardo (#118) - @arau-j (#116) - @sshcrack (#113) ## 📦 Upgrade Instructions **Homebrew:** ```bash brew upgrade d-kuro/tap/gwq ``` **Go:** ```bash go install github.com/d-kuro/gwq/cmd/gwq@v0.1.2 ``` **Full Changelog**: https://github.com/d-kuro/gwq/compare/v0.1.1...v0.1.2