From: Junio C Hamano Date: Mon, 30 Jun 2025 17:03:24 GMT Subject: Re: [PATCH v3 4/4] add-patch: add diff.context command line overrides Message-ID: In-Reply-To: "Leon Michalak via GitGitGadget" writes: > From: Leon Michalak > > This patch compliments the previous commit, where builtins that use > add-patch infrastructure now respect diff.context and > diff.interHunkContext file configurations. > > In particular, this patch helps users who don't want to set persistent > context configurations or just want a way to override them on a one-time > basis, by allowing the relevant builtins to accept corresponding command > line options that override the file configurations. > > This mimics commands such as diff and log, which allow for both context > file configuration and command line overrides. I skimmed the patch briefly. I am not sure if it is a good idea to * add OPT_DIFF_*() macros to parse-options API, as its utility is very narrow, and forces those who are learning parse-options API to learn one more thing. * validation of the value range to be duplicated for each and every users of the new OPT_DIFF_*() macros. but other than that, looked reasonable to me. Thanks.