Skip to content

feat: add conflict detection, dry-run, hooks, and ignore patterns - #4

Merged
jlaportebot merged 1 commit into
mainfrom
feat/templating-support
Jun 22, 2026
Merged

feat: add conflict detection, dry-run, hooks, and ignore patterns#4
jlaportebot merged 1 commit into
mainfrom
feat/templating-support

Conversation

@jlaportebot

Copy link
Copy Markdown
Owner

Summary

This PR adds four major features to dotfile-sync:

  1. 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.

  2. Dry-Run Preview (): Preview what backup/restore would do without making changes. Shows planned actions, skipped files, template counts, and ignore counts.

  3. 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).

  4. Ignore Patterns (): Gitignore-style pattern matching for excluding files from sync operations. Supports glob patterns, directory patterns, rooted patterns, and negation.

Integration

  • All features integrated into core and operations
  • CLI commands added: dry-run, hook, ignore
  • Conflict strategy configurable via --conflict-strategy flag

Tests

  • 232 tests pass (84% coverage)
  • All linting checks pass (ruff, format)

Follow-up

This continues the work from the feat/templating-support branch, completing the templating and sync feature set.

@jlaportebot jlaportebot added the enhancement New feature or request label Jun 22, 2026
- 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
jlaportebot force-pushed the feat/templating-support branch from f3456bf to 5a3ac29 Compare June 22, 2026 04:07
@jlaportebot
jlaportebot merged commit 0235ec6 into main Jun 22, 2026
6 checks passed
@jlaportebot
jlaportebot deleted the feat/templating-support branch June 22, 2026 06:05
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

None yet

Development

Successfully merging this pull request may close these issues.

1 participant