diff options
author | Vicent Marti <vicent@github.com> | 2014-05-17 02:37:13 +0200 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-05-17 02:37:13 +0200 |
commit | 191ff93609efd393bcb2d4747d5cb9779a78a73f (patch) | |
tree | 90447539df3b3186d656be60c48dffa805f528d2 /src/diff_driver.c | |
parent | adebcb1645f7bd652ff4449ecf41c39ded12d0c7 (diff) | |
parent | 8af4966db15ed35832235627e2d01068d4734dea (diff) | |
download | libgit2-191ff93609efd393bcb2d4747d5cb9779a78a73f.tar.gz |
Merge pull request #2362 from libgit2/rb/update-4k-to-8k
Test and fix Git diff binary detection compatibility
Diffstat (limited to 'src/diff_driver.c')
-rw-r--r-- | src/diff_driver.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/diff_driver.c b/src/diff_driver.c index dc8e79e25..c3c5f365b 100644 --- a/src/diff_driver.c +++ b/src/diff_driver.c @@ -397,7 +397,11 @@ void git_diff_driver_update_options( int git_diff_driver_content_is_binary( git_diff_driver *driver, const char *content, size_t content_len) { - const git_buf search = { (char *)content, 0, min(content_len, 4000) }; + git_buf search; + + search.ptr = (char *)content; + search.size = min(content_len, GIT_FILTER_BYTES_TO_CHECK_NUL); + search.asize = 0; GIT_UNUSED(driver); |