Hello Eric,
On 2024-04-29 08:04, Eric Sunshine wrote:
On Mon, Apr 29, 2024 at 2:00 AM Dragan Simic <dsimic@xxxxxxxxxxx>
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`.
Ah, I see, thanks for pointing this out. Makes perfect sense.