diff options
author | Keith Dahlby <dahlbyk@gmail.com> | 2012-06-09 08:48:44 +0400 |
---|---|---|
committer | Keith Dahlby <dahlbyk@gmail.com> | 2012-06-09 09:01:33 +0400 |
commit | cffdf24ef34f279fcc3231caca3f85bdf5ca02dc (patch) | |
tree | 93bced42fb8a208e94ff991d7c4a5dc6128fe718 /LibGit2Sharp/ContentChanges.cs | |
parent | 841a987be79e8075d9ff3dc5b2d03ee08d150f64 (diff) |
Make ContentChanges.IsBinaryDelta() an extension method
Diffstat (limited to 'LibGit2Sharp/ContentChanges.cs')
-rw-r--r-- | LibGit2Sharp/ContentChanges.cs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/LibGit2Sharp/ContentChanges.cs b/LibGit2Sharp/ContentChanges.cs index e0064179..7815429b 100644 --- a/LibGit2Sharp/ContentChanges.cs +++ b/LibGit2Sharp/ContentChanges.cs @@ -26,7 +26,7 @@ namespace LibGit2Sharp private int FileCallback(IntPtr data, GitDiffDelta delta, float progress) { - IsBinaryComparison = IsBinaryDelta(delta); + IsBinaryComparison = delta.IsBinary(); if (!IsBinaryComparison) { @@ -38,12 +38,6 @@ namespace LibGit2Sharp return 0; } - internal static bool IsBinaryDelta(GitDiffDelta delta) - { - //TODO Fix the interop issue on amd64 and use GitDiffDelta.Binary - return delta.OldFile.Flags.Has(GitDiffFileFlags.GIT_DIFF_FILE_BINARY) || delta.NewFile.Flags.Has(GitDiffFileFlags.GIT_DIFF_FILE_BINARY); - } - private int HunkCallback(IntPtr data, GitDiffDelta delta, GitDiffRange range, IntPtr header, uint headerlen) { string decodedContent = Utf8Marshaler.FromNative(header, headerlen); |