Repository navigation
Fix tracked-file protection and unresolved conflict reporting - #25
Merged
Merged
Conversation
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
A file ignored in the source can be tracked in the target's separate index. Exclude target-tracked paths before planning or copying so
--forcecannot overwrite them and a missing working-tree file stays absent. This restores the documented promise that tracked files are never touched.Return exit code 3 whenever conflicts remain, including a destination directory under
--force, and report that action asCONFLICTinstead ofCOPY. Successfully forced regular-file copies retain their existing behavior. The two fixes are separate commits.Also document
go install, the required Go version, PATH setup, and the currentdevversion display for source installs. Fixes #19.Validation:
make ci(format, vet, lint, tests, race) and build passed on Go 1.26.0 with urfave/cli v3.9.0. Added 24 tracked-file cases covering either/both indexes, existing/deleted targets, force and dry-run, plus 8 directory-conflict cases covering force, dry-run, JSON and human output. Disposable-repository binary smoke verified ignored-only copying, unchanged dry-runs, tracked preservation, conflicts, and exit codes 0–4.