ktsu.DiffMore.Core
1.0.1
Prefix Reserved
dotnet add package ktsu.DiffMore.Core --version 1.0.1
NuGet\Install-Package ktsu.DiffMore.Core -Version 1.0.1
<PackageReference Include="ktsu.DiffMore.Core" Version="1.0.1" />
<PackageVersion Include="ktsu.DiffMore.Core" Version="1.0.1" />
<PackageReference Include="ktsu.DiffMore.Core" />
paket add ktsu.DiffMore.Core --version 1.0.1
#r "nuget: ktsu.DiffMore.Core, 1.0.1"
#addin nuget:?package=ktsu.DiffMore.Core&version=1.0.1
#tool nuget:?package=ktsu.DiffMore.Core&version=1.0.1
ktsu.DiffMore
Cross-repository file synchronization through intelligent iterative merging
Overview
DiffMore is a revolutionary file synchronization tool that uses intelligent iterative merging to unify multiple versions of files across repositories, directories, and codebases. Unlike traditional diff tools, DiffMore progressively merges file versions by finding the most similar pairs and resolving conflicts interactively, ultimately synchronizing entire file ecosystems into a single, unified version.
đ Primary Feature: Iterative File Synchronization
The Problem
When working across multiple repositories, branches, or environments, the same files often diverge into multiple versions with overlapping changes. Traditional merge tools handle two-way merges, but when you have 3, 5, or 10+ versions of the same file scattered across different locations, manual synchronization becomes a nightmare.
The Solution: Iterative Merging
DiffMore solves this by:
- Smart Discovery: Automatically finds all versions of a file across directories/repositories
- Hash-Based Grouping: Groups identical files and identifies unique versions
- Similarity Analysis: Calculates similarity scores between all version pairs
- Optimal Merge Order: Progressively merges the most similar versions first to minimize conflicts
- Interactive Resolution: Visual TUI for resolving conflicts block-by-block
- Cross-Repository Sync: Updates all file locations with the final merged result
Real-World Use Cases
- Multi-Repository Synchronization: Sync the same configuration files across microservices
- Branch Consolidation: Merge scattered feature branch changes before cleanup
- Environment Alignment: Unify deployment scripts across dev/staging/prod environments
- Code Migration: Consolidate similar files when merging codebases
- Documentation Sync: Align README files across related projects
Features
đ Iterative Merging Engine
- Smart File Detection: Automatically finds and groups identical file versions by hash
- Similarity-Based Progression: Uses advanced algorithms to find the most similar files and merge them in optimal order
- Cross-Repository Updates: Synchronizes all file locations with the merged result
- Progressive Conflict Reduction: Each merge reduces complexity for subsequent merges
- Interactive Conflict Resolution: Visual TUI for resolving merge conflicts block-by-block
- Version Tracking: Maintains awareness of which files need updating across all locations
đ Advanced File Analysis
- Hash-Based Comparison: Fast file comparison using content hashing for instant duplicate detection
- Content Similarity Scoring: Sophisticated algorithms to determine merge order
- Multiple Diff Formats:
- Change Summary (added/removed lines only)
- Git-style diff (full context)
- Rich colored diff (visual formatting)
- Side-by-Side Display: Context-aware diff visualization with intelligent file ordering
đ§ Repository & Directory Operations
- Directory Comparison: Compare entire directories with customizable file patterns
- Recursive Search: Deep directory traversal to find all file versions
- Batch Synchronization: Update multiple file locations simultaneously
- Safe Operations: Built-in error handling and rollback capabilities
đģ Interactive Experience
- Rich Terminal Interface: Colored output and intuitive navigation with Spectre.Console
- Command History: Arrow key navigation through previous inputs with persistent history
- Default Values: Smart defaults based on most recently used inputs
- Progress Indicators: Real-time feedback for long-running operations
- Block-Level Control: Choose how to handle each difference (keep, remove, use version 1/2, use both)
Installation
Add the NuGet package:
dotnet add package ktsu.DiffMore
Usage
Primary Workflow: Iterative File Synchronization
# Launch interactive mode for iterative merging
DiffMore.ConsoleApp
# Select "đ Iterative Merge Multiple Versions"
# 1. Specify the directory containing your repositories/projects
# 2. Enter the filename pattern (e.g., "README.md", "config.json", "*.yml")
# 3. Watch as DiffMore finds all versions and merges them optimally
# 4. Resolve conflicts interactively when needed
# 5. All file locations are automatically updated with the unified result
Command Line Mode
# Quick comparison for files with the same name across directories
DiffMore.ConsoleApp <directory> <filename>
Interactive Mode Options
- đ Iterative merge multiple file versions - PRIMARY FEATURE - Cross-repository file synchronization
- đ Compare files with same name across directories - Find and compare files with identical names
- đ Compare two directories - Full directory comparison with file patterns
- đ Compare two specific files - Direct file-to-file comparison
- âšī¸ Show help - Comprehensive feature overview
Iterative Merge Deep Dive
- File Discovery: Scans directory tree for matching files
- Version Analysis: Groups identical files, identifies unique versions
- Similarity Calculation: Determines optimal merge sequence
- Progressive Merging: Merges most similar pairs first
- Conflict Resolution: Interactive TUI for each conflict block
- Cross-Repository Update: Writes merged result to all original locations
- Verification: Confirms all locations now contain identical, unified content
Why Iterative Merging?
Traditional tools merge two files at a time, requiring manual orchestration for multiple versions. DiffMore's iterative approach:
- Minimizes Conflicts: By merging similar versions first, later merges have fewer conflicts
- Optimizes Decision Making: Present easier decisions first, complex conflicts last
- Maintains Context: Each merge builds on previous decisions
- Scales Naturally: Works equally well with 3 files or 30 files
- Preserves Intent: Interactive resolution ensures human judgment guides the process
License
MIT License. Copyright (c) ktsu.dev
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- DiffPlex (>= 1.7.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
## v1.0.1
Initial release or repository with no prior history.