Re: [PATCH 00/26] git-log: implement new --diff-merge options

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

 



Elijah Newren <newren@xxxxxxxxx> writes:

>> It does not mean that I do not like the current behaviour that
>> "--cc" always implies "-p"; it is convenient.  It's just I find the
>> lack of feature slightly less than ideal, but I do not care deeply
>> enough to design how to express such a feature from the command
>> line.
>
> Okay, thanks for clarifying.  It sounds like you were focusing on the
> tangentially related comment I made (diffs for merges and not for
> normal commits) while I was focusing on Sergey's question (should we
> revert --cc implies -p).  I was having a hard time understanding if
> you were answering his question or not.  This last paragraph of yours
> acknowledges the question, though you still avoid answering it.  :-)

I do like the current behaviour that "--cc" always implies "-p"; it
is convenient.  I just wish there were a way to say "enable -p only
for merges" while taking advantage of the convenience.

So, no we should not stop "--cc" or "-c" implying "-p".

When the end-user gives "-m" on the command line of either "show" or
"log", it cleanly means the user is interested in "individual"
patches shown for each parent when showing a merge commit, so "-p"
implied by "-m" would make sense just as much as "-p" implied by
"--cc".  The same comment about the lack of "want -p to be implied
but only for merges" as an add-on feature applies here, though.

I suspect that the real reason why "-m" does not imply "-p" was
merely a historical implementation detail (e.g. imagine that we
wanted *not* to show things by default in a subcommand in "log"
family, but when "-p" is used, wanted it to mean "-m -p", or
something like that.  Setting "-m" on by default without explicitly
given from the command line, and making sure that m-bit does not
imply "-p", would be an easy-to-implement such a "when '-p' is
given, take it to mean as '-m -p'" _feature_).

If I were to decide now with hindsight, perhaps I'd make "--cc" and
"-m" imply "-p" only for merge commits, and the user can explicitly
give "--cc -p" and "-m -p" to ask patches for single-parent commits
to be shown as well.




[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