-
Notifications
You must be signed in to change notification settings - Fork 35
feat(copy-ignored): default to copying all gitignored files #481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
dc8d6c6 to
79685da
Compare
When no `.worktreeinclude` file exists, `wt step copy-ignored` now copies all gitignored files (as if `.worktreeinclude` contained `**`). This makes the command work out of the box without requiring configuration. Projects that want to limit what gets copied can still create a `.worktreeinclude` file to filter the files. Co-Authored-By: Claude <[email protected]>
79685da to
ad8c308
Compare
Replace quoted branch names with bold styling in error messages to follow output formatting guidelines: - config.rs: Use GitError::InvalidReference for branch not found - step_commands.rs: Add WorktreeNotFound and WorktreeIncludeParseError GitError variants with proper styling - step_commands.rs: Use cformat! for rebase error message Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Error messages should display fully regardless of terminal size. Using fixed width (500) prevents test inconsistency between local development (which detects terminal size) and CI (which uses COLUMNS). Co-Authored-By: Claude <[email protected]>
Add tests for --from and --to flags with branches that have no worktrees, covering the WorktreeNotFound error variant. Co-Authored-By: Claude <[email protected]>
The snapshot matches CI behavior (COLUMNS=150). Local terminal detection may differ but CI is authoritative. Co-Authored-By: Claude <[email protected]>
8f7901f to
57ce64f
Compare
Co-Authored-By: Claude <[email protected]>
57ce64f to
c384c4a
Compare
External error messages (from git, ignore crate, etc.) often contain file paths that vary dramatically in length across platforms: - macOS temp paths: /private/var/folders/.../T/.tmpXXX/... (~80 chars) - Linux temp paths: /tmp/... (~10 chars) When format_with_gutter wraps based on terminal width (e.g., 150 cols), a 134-char error message fits on Linux but wraps on macOS due to the longer temp paths. This causes snapshot test failures because the line breaks are baked in before insta normalizes paths to _REPO_. Fix by using a large fixed width (500) for format_error_block, ensuring external error content is never wrapped. This matches the existing pattern where gutter content (shell commands, etc.) is kept short. Co-Authored-By: Claude <[email protected]>
macOS temp paths (~80 chars like /private/var/folders/.../...) are much longer than Linux paths (~10 chars like /tmp/...). Error messages containing these paths would wrap at different positions, causing snapshot mismatches in CI. Instead of adding special handling in library code, simply increase COLUMNS in the test environment to give sufficient room for long paths. Co-Authored-By: Claude <[email protected]>
With wider terminal: - Help text paragraphs fit on single lines instead of wrapping - wt list has room to show Path column that was previously hidden - Long commit messages show more characters before truncation - Gutter content shows on single line These are expected changes from increasing COLUMNS from 150 to 500. Co-Authored-By: Claude <[email protected]>
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
wt step copy-ignorednow works without a.worktreeincludefile.worktreeincludecontained**).worktreeincludeto limit what gets copiedTest plan
test_copy_ignored_default_copies_allverifies default behavior🤖 Generated with Claude Code