Re: [PATCH v2 0/7] making log --first-parent imply -m
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 2, 2020, 17:35 UTC
- Message-ID
- <xmqqsgd5rlwi.fsf@gitster.c.googlers.com>
- In-Reply-To
- <87mu3drynx.fsf@osv.gnss.ru>
Sergey Organov <sorganov@gmail.com> writes:
Show 6 quoted lines
> What I in fact have in mind is something like: > > --diff-merges[=<parent-number>|c|cc|all] > > to have a single point of definition of the needed format of merges > representation.
A command line option that takes _optional_ argument is evil; it hurts teachability (e.g. "why does this option always require "--opt=val" and refuses '--opt val'?"). Making the optional value configurable is even more so (e.g. "teacher said to use '--opt', but it does not behave the way she taught---ah, I have this config").
> Then comes the question of the default. "all" is what'd make it behave > as "-m" behaves now. If it's too late for --diff-merges to have > different default, could the default possibly be a configuration > option rather than yet another command-line option?
Introduce --diff-parent=(none|<parent-number>|c|cc|all) that is different from --diff-merges, and -m and --[no-]diff-merges can be defined in terms of that, at which point we can gradually deprecate them if we wanted to, no?