Skip to content

[sync] Show diffs for overwritten resources (#66)#110

Merged
coisa merged 2 commits intomainfrom
codex/66-sync-overwrite-diff
Apr 19, 2026
Merged

[sync] Show diffs for overwritten resources (#66)#110
coisa merged 2 commits intomainfrom
codex/66-sync-overwrite-diff

Conversation

@coisa
Copy link
Copy Markdown
Contributor

@coisa coisa commented Apr 19, 2026

Summary

  • add a small overwrite diff helper so copy-resource --overwrite can classify replacements as changed, unchanged, binary, or unreadable
  • show unified diffs for changed text files, skip no-op overwrites when contents already match, and keep binary/unreadable fallbacks readable in terminal and CI logs
  • document the new overwrite reporting in the copy-resource and dev-tools:sync command pages

Testing

  • ./vendor/bin/phpunit tests/Console/Command/CopyResourceCommandTest.php tests/Resource/OverwriteDiffRendererTest.php
  • ./vendor/bin/phpunit tests/Console/Command tests/Console/CommandLoader tests/Composer/Capability tests/Console/DevToolsTest.php
  • git diff --check

Notes

  • composer dev-tools was also run, but it still fails in this environment because Rector/PHP CS Fixer parallel workers cannot bind tcp://127.0.0.1:0 (EPERM) and Composer cannot reach Packagist (curl error 6).
  • The PHPUnit command suite still emits the existing JoliNotif third-party subscriber warning at shutdown in this environment.

Closes #66

@github-actions github-actions Bot added enhancement New feature or request labels Apr 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

@coisa coisa merged commit 839026b into main Apr 19, 2026
2 checks passed
@coisa coisa deleted the codex/66-sync-overwrite-diff branch April 19, 2026 06:26
github-actions Bot added a commit that referenced this pull request Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Released

Development

Successfully merging this pull request may close these issues.

Show diffs when sync overwrite replaces files

1 participant