Re: Why doesn't `git log -m` imply `-p`?
From: Sergey Organov <hidden>
Date: 2021-05-06 12:59:45
Junio C Hamano [off-list ref] writes:
Sergey Organov [off-list ref] writes:quoted
No, I don't mean it. The idea is to let -m be alias for "--diff-merges=on -p",...Ahhhh, that makes a whole lot of difference. Thanks.quoted
If, on the other hand, it's just me who fundamentally misunderstands the design, then I need to be corrected fast, before I make significant damage.No, it was I who was confused, as I somehow incorrectly thoguht that your plan was to make "-m" identical to "--diff-merges=on". But if your plan is to make "git log -m" (no other option) "git log -m -p" behave identically to "git log --diff-merges=on -p",
Yep, exactly.
and similarly make
"git log -m --stat"
"git log -m --raw"
behave identically to "git log --diff-merges=on --stat/--raw", I
think that such a design makes quite a lot of sense.These I honestly didn't even think about before, but now, after you've brought them, I'll pay attention, thanks!
It will still keep the purity of "--diff-merges=<choice>" (that is, it only is about if/how a merge is expressed in some form of diff), while solving the longstanding usability issue of "-m" that led to Alex's "when a user says -m, diff output is expected", that came quite early in this thread.
It's nice we've reached mutual understanding! The only remaining issue then is if we just go and do the change of -m semantics, or do we need to take some backward compatibility measures? Looks like we are rather safe to just go, as it's unlikely there will be any real breakage. What do you think? Thanks, -- Sergey Organov