From: Pratyush Yadav Date: Wed, 16 Oct 2019 19:44:31 GMT Subject: Re: [PATCH 1/1] builtin/blame.c: constants into bit shift format Message-ID: <20191016194431.pax5kahg7d3zhlmo@yadavpratyush.com> In-Reply-To: <20191016193750.258148-1-jonathantanmy@google.com> On 16/10/19 12:37PM, Jonathan Tan wrote: > > There was some discussion recently about converting these related > > #defines to enums [0]. We might consider doing that here. > > > > If you read through that entire thread, you'd see that there were some > > disagreements about whether using enums for sets of bits is a good idea > > ([1] and [2]), but it is at least something worth considering while we > > are on this topic. > > > > FWIW, I think it is a good idea to use an enum here. > > [snip] > > > [0] https://public-inbox.org/git/20191010115230.10623-1-wambui.karugax@gmail.com/ > > [1] https://public-inbox.org/git/20191014182754.82302-1-jonathantanmy@google.com/ > > [2] https://public-inbox.org/git/xmqqk19ag60g.fsf@gitster-ct.c.googlers.com/ > > Thanks for the handy references. You know my opinion on bitflags as > enums from reading them, but I think that we have already had that > discussion and came to a conclusion. So don't use an enum here. Ah! I missed your last email in that thread that finally settled on avoiding bitsets, and thought the discussion was still ongoing. My bad :) > The patch itself looks good, and I also prefer the bit shift format over > octal. -- Regards, Pratyush Yadav