feat: worktree shared files — centralize untracked config across worktrees (#328)#331
Merged
feat: worktree shared files — centralize untracked config across worktrees (#328)#331
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ion, and symlink helpers Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…k/status/sync Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add 5 YAML scenarios covering daft shared add, materialize/link, remove, sync, and --declare. Also fix daft shared arg parsing by using skip(1) pattern (like hooks) so clap receives the correct args when invoked as `daft shared <subcommand>`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
git worktree list --porcelain includes the bare repo as the first entry. list_worktree_paths() now detects and skips entries marked as "bare", preventing status/sync/remove from treating the bare repo directory as a worktree to link files into. Also commits the design spec and implementation plan. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
40b4da3 to
8558d3d
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Display "Linking shared files" and per-file status during worktree creation, after worktree-pre-create and before worktree-post-create hooks. Uses a single LinkMessage enum callback to avoid dual mutable borrow issues. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5c0d680 to
0965ccb
Compare
Shared file linking now returns a result struct instead of printing during the spinner. The command layer renders results after the spinner finishes, showing one line per linked file with colored output. Status command now uses colors: green for linked, cyan for materialized, yellow for conflict/broken, dim for missing, bold for file paths. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shared file link results are now rendered inside link_shared_files_on_create via eprintln, so they appear before hooks take over the terminal. Previously they were deferred to the command layer and printed after the spinner finished, which placed them after the hooks output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wipe the current terminal line with \r\x1b[2K before printing shared file link results, preventing spinner ghost artifacts from remaining on screen. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
daft shared link .env [worktree] daft shared materialize .env [worktree] The worktree argument accepts a directory name or path. Defaults to the current worktree when omitted. Also changes link and materialize to accept a single path instead of multiple. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- add: file completion + --declare flag - remove: completes from shared files in daft.yml + --delete flag - link/materialize: position 1 completes shared files, position 2 completes worktree names + --override flag - status/sync: flag completion only Adds shared-files and shared-worktrees completion types to the __complete helper, reading from daft.yml and git worktree list. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
daft sharedcommand with 6 subcommands:add,remove,materialize,link,status,sync.env,.idea/,.vscode/, etc.) in.git/.daft/shared/with symlinks across worktreesworktree-post-createhooksshared:field todaft.ymlfor declaring shared pathsFixes #328
Test plan
🤖 Generated with Claude Code