Re: [PATCH v2 1/1] advice: add --no-advice global option
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Apr 29, 2024, 06:04 UTC
- Message-ID
- <CAPig+cRQVD9ZrvBd=49S6=9WsWWNdUWp1u9pADSv17bh_vJGTQ@mail.gmail.com>
- In-Reply-To
- <4991578233e75f5a9f096b701c4b5efd@manjaro.org>
On Mon, Apr 29, 2024 at 2:00 AM Dragan Simic <dsimic@manjaro.org> wrote:
Show 10 quoted lines
> 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`.