fix(copy): honor configured directory patterns#173
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
WalkthroughThe Changes
Sequence DiagramsequenceDiagram
actor User
participant cmd_copy as cmd_copy()
participant Pattern as copy_patterns()
participant Directory as copy_directories()
participant FileSystem as File System
User->>cmd_copy: Invoke with options (--all, --from, --dry-run)
cmd_copy->>cmd_copy: Read gtr.copy.include/exclude patterns
cmd_copy->>cmd_copy: Read gtr.copy.includeDirs/excludeDirs
alt patterns exist
cmd_copy->>Pattern: Call with patterns, dry_run flag
Pattern->>FileSystem: Copy matching files (or log dry-run)
Pattern-->>cmd_copy: Return copied count
end
alt dir_includes exist
cmd_copy->>Directory: Call with dir_includes, dry_run flag
Directory->>FileSystem: Copy matching directories (or log dry-run)
Directory-->>cmd_copy: Return copied count
end
cmd_copy-->>User: Output copy summary
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
averyjennings
left a comment
There was a problem hiding this comment.
Looks good — no blockers found.
Summary
git gtr copyhonor configuredgtr.copy.includeDirs/gtr.copy.excludeDirswhen copying from config.git gtr copy -npreviews without mutating targets.--all,--from, and dry-run behavior.Fixes #168.
Testing
bats tests/cmd_copy.bats tests/copy_safety.batsbats tests/shellcheck lib/commands/copy.sh lib/copy.shgit diff --checkSummary by CodeRabbit
.zed/,.idea/) to include or exclude during copy operations.