Re: [Outreachy] [PATCH] blame: Convert pickaxe_blame defined constants to enums

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

 



On Fri, Oct 11, 2019 at 11:48:03AM -0700, Jonathan Tan wrote:
> > > Any reason why the names are renamed to omit "PICKAXE_"? In particular,
> > > these names are still global, so it is good to retain the extra context.
> > > 
> > > (This doesn't mean that you are wrong to remove them - I just gave my
> > > opinion, and a reason for my opinion. If you had a reason to remove
> > > them, you can mention that, and we can discuss this together. Or, if you
> > > read my reason and agree with it, you can say that and put the
> > > "PICKAXE_" back.)
> > > 
> > I wasn't really sure about omitting the "PICKAXE_" prefix, but I looked
> > at some of the other defined enums and it seemed like what would act as
> > the prefix in #defines was only used in the enum declaration. For
> > example I looked at:
> > 	enum apply_ws_error_action {
> > 		nowarn_ws_error,
> > 		warn_on_ws_error,
> > 		die_on_ws_error,
> > 		correct_ws_error
> > 	};
> > 
> > For comparison, I took "apply_" as the prefix that would translate to 
> > "#define APPLY_" which isn't included in the member variables.
> > I do agree about retaining the extra context though, so I can definitely put the
> > "PICKAXE_" back.
> 
> [snip]
> 
> > > In Git, we often look at historical commits, so it is good to keep
> > > history as clean as possible. In particular, we shouldn't move things
> > > around unless we have another reason to. Here, for example, you are
> > > moving the constants from above BLAME_DEFAULT_* to below. You should
> > > move them back. (Or if you have a reason for moving, mention that and we
> > > can discuss it.)
> > > 
> > I'll move them back. I have experience with all the "#define" constants
> > being immediately after the "#includes" which is why I moved them, but I'll
> > try to stick to the
> > convention from now on.
> 
> Thanks for providing your justifications.
> 
> > > Also, I have a slight preference for putting "= 02" on the BLAME_COPY
> > > line but that is not necessary.
> > > 
> > Noted.
> 
> Well, Junio provides a good reason for putting "= 02" [1], so please do
> that.
> 
> [1] https://public-inbox.org/git/xmqqsgnzj4vs.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx/

Yes, I'll include it in an updated patch
Thanks

wambui karuga



[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]

  Powered by Linux