Re: [PATCH 1/1] builtin/blame.c: constants into bit shift format
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Oct 16, 2019, 19:37 UTC
- Message-ID
- <20191016193750.258148-1-jonathantanmy@google.com>
- In-Reply-To
- <20191016191012.ij3zbexu7pxupdho@yadavpratyush.com>
Show 9 quoted lines
> 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.
The patch itself looks good, and I also prefer the bit shift format over octal.