Re: [PATCH 4/4] diff: mark any file larger than core.bigfilethreshold binary

2014-06-23 Thread Thomas Braun
Am 23.06.2014 14:18, schrieb Duy Nguyen: > On Thu, Jun 19, 2014 at 7:27 PM, Thomas Braun > wrote: >>> @@ -2721,6 +2721,11 @@ int diff_populate_filespec(struct diff_filespec *s, >>> unsigned int flags) >>> } >>> if (size_only) >>> return 0; >>> +

Re: [PATCH 4/4] diff: mark any file larger than core.bigfilethreshold binary

2014-06-23 Thread Duy Nguyen
On Thu, Jun 19, 2014 at 7:27 PM, Thomas Braun wrote: >> @@ -2721,6 +2721,11 @@ int diff_populate_filespec(struct diff_filespec *s, >> unsigned int flags) >> } >> if (size_only) >> return 0; >> + if ((flags & DIFF_POPULATE_IS_BINARY) &&

Re: [PATCH 4/4] diff: mark any file larger than core.bigfilethreshold binary

2014-06-19 Thread Thomas Braun
Am Donnerstag, den 29.05.2014, 19:57 +0700 schrieb Nguyễn Thái Ngọc Duy: Hi, sorry for chiming in so late. I've just played around with patch 3 and 4 of that series. And I like it very much as I work often with large files so any further enhancement in that area is really nice. (see comments b

[PATCH 4/4] diff: mark any file larger than core.bigfilethreshold binary

2014-05-29 Thread Nguyễn Thái Ngọc Duy
Too large files may lead to failure to allocate memory. If it happens here, it could impact quite a few commands that involve diff. Moreover, too large files are inefficient to compare anyway (and most likely non-text), so mark them binary and skip looking at their content. Noticed-by: Dale R. Wor