Add ability to diff two arbitrary buffers by APErebus · Pull Request #2146 · libgit2/libgit2sharp · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
332 changes: 332 additions & 0 deletions LibGit2Sharp.Tests/DiffBufferToBufferFixture.cs
10 changes: 10 additions & 0 deletions LibGit2Sharp/ContentChanges.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ internal unsafe ContentChanges(Repository repo, Blob oldBlob, Blob newBlob, GitD
LineCallback);
}

internal unsafe ContentChanges(byte[] oldBuffer, byte[] newBuffer, GitDiffOptions options)
{
Proxy.git_diff_buffers(oldBuffer,
newBuffer,
options,
FileCallback,
HunkCallback,
LineCallback);
}

internal ContentChanges(bool isBinaryComparison)
{
this.IsBinaryComparison = isBinaryComparison;
Expand Down
17 changes: 17 additions & 0 deletions LibGit2Sharp/Core/NativeMethods.cs
Loading