From: Thomas Braun Date: Mon, 23 Jun 2014 19:21:12 GMT Subject: Re: [PATCH 4/4] diff: mark any file larger than core.bigfilethreshold binary Message-ID: <53A87E28.8050903@virtuell-zuhause.de> In-Reply-To: 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; >>> + if ((flags & DIFF_POPULATE_IS_BINARY) && >>> + s->size > big_file_threshold && s->is_binary == -1) { >>> + s->is_binary = 1; >>> + return 0; >>> + } >> >> Why do you check for s->is_binary == -1 here? I think it does not matter >> what s_is_binary says here. > > If some .gitattributes to mark one file not-binary, we should respect > that, I think. Same for below too. Reading diffcore.h I thought is_binary being -1 means it is not yet decided if it is binary or text. Respecting .gitattributes is obviously a good thing :)