Re: Why doesn't `git log -m` imply `-p`?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alex Henrie <alexhenrie24@xxxxxxxxx> writes:

> On Wed, Apr 28, 2021 at 9:22 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>>
>> Alex Henrie <alexhenrie24@xxxxxxxxx> writes:
>>
>> > Why do -c and -cc imply -p, but -m does not? I tried to use both `git
>> > log -c` and `git log -m` today and was confused when the latter didn't
>> > produce any output. Could we change this behavior in a future version
>> > of Git?
>>
>> "[alias] lm = log -m" can be used when you only want the logs
>>
>>     $ git lm maint..master
>>
>> or when you want to also view patches your preference is to see all
>> sides of diffs of merges
>>
>>     $ git lm -p maint..mater
>>
>> but depending on who you are that may be of dubious utility.
>>
>> It is best to move on, writing it off as historical accident, and
>> embrace the new --diff-merges=m option, instead of wasting time on
>> pondering "why", because accidents do not have to have a deep reason
>> behind them ;-)
>
> If the behavior is an idiosyncratic accident of dubious utility, let's
> replace it with something that makes sense and is useful :-) If we
> make -m imply -p then no alias is necessary, `git log` would display
> the log without diffs and `git log -m` would display the log with all
> the diffs.
>
> On Thu, Apr 29, 2021 at 6:38 AM Sergey Organov <sorganov@xxxxxxxxx> wrote:
>>
>> As the final purpose of all this is to have -m as user-friendly short
>> option, I'd incline to finally let it imply -p, as --diff-merges=m now
>> covers another side of the coin.
>>
>> What do you think?
>
> I am 100% in favor of that proposal, and I can work on the code this
> weekend.

No need to bother. If we agree, I'll send a patch atop of my recent
changes that make -m format configurable.

Alternatively, we can add a configuration option, or let -m imply -p
only when -m format is explicitly configured by the user.

-- Sergey Organov



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux