From: Eric Sunshine Date: Mon, 29 Apr 2024 06:04:35 GMT Subject: Re: [PATCH v2 1/1] advice: add --no-advice global option Message-ID: In-Reply-To: <4991578233e75f5a9f096b701c4b5efd@manjaro.org> On Mon, Apr 29, 2024 at 2:00 AM Dragan Simic wrote: > On 2024-04-29 07:36, Dragan Simic wrote: > > Regarding what to do if those two options are both supplied, > > it's simple, just error out with an appropriate error message. > > There are already similar situations in the code, e.g. with > > the -k and --rfc options for git-format-patch(1). > > Actually, the -p/--paginate and -P/--no-pager options can > currently be supplied together, which isn't the expected > behavior. I'm preparing a patch that will cover this as > a case of the mutual option exclusivity. Please don't. "Last wins" is an intentionally-supported mode of operation for many Git options. It allows you to override an option which may have been supplied by some other entity/mechanism. For instance, you may have a Git alias, say `git mylog`, which employs --paginate, but you want to avoid pagination on a particular run, so you invoke it as `git mylog --no-pager`.