Re: [PATCH 4/4] diff: mark any file larger than core.bigfilethreshold binary
- From
Thomas Braun <thomas.braun@virtuell-zuhause.de>
- Date
- Jun 23, 2014, 19:21 UTC
- Message-ID
- <53A87E28.8050903@virtuell-zuhause.de>
- In-Reply-To
- <CACsJy8A5StEv4O64rnd39+1jMNWiaAv4oOd0+Yko_JPuk6EYZw@mail.gmail.com>
Am 23.06.2014 14:18, schrieb Duy Nguyen:
Show 17 quoted lines
> On Thu, Jun 19, 2014 at 7:27 PM, Thomas Braun
> <thomas.braun@virtuell-zuhause.de> 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 :)