Thanks for your interest in contributing. This is a small, single-maintainer project, but outside contributions are welcome.
- .NET 8 targeting
net8.0-windows(WPF). - AvalonEdit for the diff text editors (left, right, and inline panes).
- DiffPlex for the line-level and word-level diff algorithm.
- LibGit2Sharp for reading
repository state. Hunk write operations (stage / unstage / revert) shell
out to
git.exeonPATHviaGitWriteService. - CommunityToolkit.Mvvm
for
ObservableObject,[RelayCommand], and[ObservableProperty]. - xUnit + FluentAssertions for the test project.
DiffViewer/— the WPF app.DiffViewer.Tests/— xUnit unit tests, mostly targeting view-models and services.InternalsVisibleTois granted to the test project sointernalhelpers are reachable.
AGENTS.md at the repo root is an agent-facing structured reference that
also serves as a quick map of the codebase — read it for the short version
of project conventions.
See the README's "Build from source" section. TL;DR:
dotnet build -c Release
dotnet test
dotnet run --project DiffViewer\DiffViewer.csprojPlease run dotnet test locally before opening a PR. CI
(.github/workflows/build.yml) runs the same on every push and PR.
DiffViewer writes settings and recent-context history under
%APPDATA%\DiffViewer\:
settings.json— persisted UI preferences (font, toggles, suppressed confirmation flags, etc.).recents.json— up to 10 most recent launch contexts.
Corrupt or future-version files are renamed to .bak rather than
overwritten; see SettingsService and RecentContextsService for the
exact behavior.
DiffViewer.csproj has one load-bearing publish setting that's easy
to remove by accident:
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>This is what makes LibGit2Sharp's native git2-*.dll work inside the
single-file bundle (they get extracted to %TEMP% on first launch).
Do not remove without testing on a clean machine.
- Commit messages: free-form, but be specific. No required prefix.
- Branching: work directly on
masterfor small, low-risk changes; use a feature branch + PR for anything risky or non-trivial. - Run
dotnet testbefore pushing. - Keep changes surgical and focused. Don't fold unrelated cleanup into a feature commit.
Release builds are tag-driven and published via
.github/workflows/release.yml. See the
README's "Releases" section. Don't fold a release
into a normal feature commit — release tags should point at the commit
that should ship.
By contributing, you agree that your contributions will be licensed under the MIT License that covers the project.