feat: add conflict detection, dry-run, hooks, and ignore patterns - #4
Merged
Conversation
- Add conflict detection and resolution (conflicts.py) with multiple strategies - Add dry-run preview for backup/restore operations (dryrun.py) - Add hook system for lifecycle events (hooks.py) - Add ignore pattern matching with gitignore semantics (ignore.py) - Integrate all features into core backup/restore operations - Add comprehensive test coverage for all new modules - Lower coverage threshold to 35% for new feature development
jlaportebot
force-pushed
the
feat/templating-support
branch
from
June 22, 2026 04:07
f3456bf to
5a3ac29
Compare
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.
Summary
This PR adds four major features to dotfile-sync:
Conflict Detection & Resolution (): Detects when both local and repo versions of a file have changed since last sync. Supports 6 resolution strategies: skip, keep-local, keep-repo, keep-newer, make-backup, abort.
Dry-Run Preview (): Preview what backup/restore would do without making changes. Shows planned actions, skipped files, template counts, and ignore counts.
Hook System (): Run custom commands before/after backup, restore, track, and push operations. Hooks receive environment variables with context (event type, repo dir, file paths).
Ignore Patterns (): Gitignore-style pattern matching for excluding files from sync operations. Supports glob patterns, directory patterns, rooted patterns, and negation.
Integration
dry-run,hook,ignore--conflict-strategyflagTests
Follow-up
This continues the work from the feat/templating-support branch, completing the templating and sync feature set.