Skip to content

Conversation

@max-sixty
Copy link
Owner

Summary

  • wt step copy-ignored now works without a .worktreeinclude file
  • Default behavior copies all gitignored files (as if .worktreeinclude contained **)
  • Projects can still create .worktreeinclude to limit what gets copied

Test plan

  • New test test_copy_ignored_default_copies_all verifies default behavior
  • Existing tests pass (16 total)
  • Coverage shows changed lines are tested

🤖 Generated with Claude Code

@max-sixty max-sixty force-pushed the worktreeinclude branch 2 times, most recently from dc8d6c6 to 79685da Compare January 9, 2026 01:35
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]>
max-sixty and others added 5 commits January 8, 2026 18:13
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]>
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]>
@max-sixty max-sixty force-pushed the worktreeinclude branch 2 times, most recently from 8f7901f to 57ce64f Compare January 9, 2026 03:51
max-sixty and others added 3 commits January 8, 2026 20:13
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]>
@max-sixty max-sixty merged commit 53d6409 into main Jan 9, 2026
27 of 28 checks passed
@max-sixty max-sixty deleted the worktreeinclude branch January 9, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants