Re: [PATCH 7/8] diff.h: extend "flags" field to 64 bits because we're out of bits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 26, 2015 at 12:39 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> writes:
>
>> I renamed both "flags" and "touched_flags" fields while making this
>> patch to make sure I was aware of how these flags were manipulated
>> (besides DIFF_OPT* macros). So hopefully I didn't miss anything.
>
> It is a bad taste to use user_defined_t typedef (I think it actually
> is a standard violation), isn't it?

Yeah I think you posted a patch somewhere updating CodingGuidelines about this..

> The diff-struct is not like objects where we need million copies of
> in-core while running.  What do you need many more flags for?

We already use all 32 bit flags and I need one more flag. I guess I go
with flags because it's how we add features in diff struct. Adding a
new field instead of extending flags could be dangerous: elsewhere
people copy flags out to a temporary place, do something then restore.
If it's a separate field, it's left in place and bad things could
happen.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]