Am 25.01.22 um 21:52 schrieb Jean-Noël AVILA: > Le lundi 24 janvier 2022, 12:06:19 CET Phillip Wood a écrit : >> On 24/01/2022 07:14, Johannes Sixt wrote: >>> A general comment: To me, it looks like you didn't want to change the >>> variable name 'f' in the first hunk above, and then just named the array >>> 'f_options' to go with 'f'. Perhaps `exclusive_opt` (not plural!) for >>> the array. Now, renaming 'f' to something longer makes the code a bit >>> unwieldy. Therefore, let me suggest yet another approach: factor out >>> functions check_exclusive_opts3(), check_exclusive_opts4(), to be used > like >>> >>> check_exclusive_opts3(use_stdout, "--stdout", >>> rev.diffopt.close_file, "--output", >>> output_directory, "--output-directory"); >>> >>> I am not yet proposing check_exclusive_opts2(), but others may think it >>> is an improvement, too, (if they think that such functions are an >>> improvement in the first place). > > Will factorize away such exclusive options, but I'm not sure where. Should it > be in git-compat-util.h? How about parse-options.*? There are already some helper functions near the end of parse-options.c. Perhaps the names I suggested must be revised, though. -- Hannes