From: Phillip Wood Date: Thu, 09 Feb 2023 20:53:16 GMT Subject: Re: [PATCH v7 5/7] diff-lib: refactor out diff_change logic Message-ID: <4a09db46-5c45-c953-d3ff-383499ab0e21@dunelm.org.uk> In-Reply-To: Hi Calvin On 08/02/2023 23:12, Calvin Wan wrote: >> I worry that having three integer parameters next to each other makes it >> very easy to mix them up with out getting any errors from the compiler >> because the types are all compatible. Could the last two be combined >> into a flags argument? A similar issues occurs in >> match_stat_with_submodule() in patch 7 > > I'm not sure how much more I want to engineer a static helper function > that is only being called in one other place. I also don't understand what > you mean by combining the last two into paramters a flags argument. Are `dirty_submodule` and `changed` booleans? If so then you can have a single bit flags argument made up of #define SUBMODULE_DIRTY 1 #define SUBMODULE_CHANGED 2 Best Wishes Phillip