diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-11-29 14:48:22 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-11-29 23:08:17 +0400 |
commit | ec1a6b7af9fecb5a65abe12926597129025cf2a5 (patch) | |
tree | 3072c9481bd56f686788c07a9721574265d83022 /LibGit2Sharp/ContentChanges.cs | |
parent | c57f25825adb771919d93f8c6cc539a91bcce467 (diff) |
Make Diff.Compare() able to compare null Blobs
Diffstat (limited to 'LibGit2Sharp/ContentChanges.cs')
-rw-r--r-- | LibGit2Sharp/ContentChanges.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/LibGit2Sharp/ContentChanges.cs b/LibGit2Sharp/ContentChanges.cs index a8d395ba..8f577be6 100644 --- a/LibGit2Sharp/ContentChanges.cs +++ b/LibGit2Sharp/ContentChanges.cs @@ -17,7 +17,10 @@ namespace LibGit2Sharp internal ContentChanges(Repository repo, Blob oldBlob, Blob newBlob, GitDiffOptions options) { - Proxy.git_diff_blobs(repo.Handle, oldBlob, newBlob, options, FileCallback, HunkCallback, LineCallback); + Proxy.git_diff_blobs(repo.Handle, + oldBlob != null ? oldBlob.Id : null, + newBlob != null ? newBlob.Id : null, + options, FileCallback, HunkCallback, LineCallback); } private int FileCallback(IntPtr data, GitDiffDelta delta, float progress) |