Re: git log fails to show all changes for a file
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 15, 2015, 18:17 UTC
- Message-ID
- <xmqqtwt5wai9.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CA+55aFw=PJtc7jXLUx+tJhAeVO3vpQjsd+oYW+OwCU20_Qft-w@mail.gmail.com>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 8 quoted lines
> On Wed, Jul 15, 2015 at 10:58 AM, Junio C Hamano <gitster@pobox.com> wrote: >> >> * When '-p' is given, we show only diff with first-parent by >> default, regardless of the traversal (i.e. --first-parent option >> currently controls both traversal and patch display, but in the >> new world order, it reverts back to purely a traversal option). > > So this is a suggested change to "-p -m" behavior?
Not really. This is a suggested behaviour for "git log -p"; I wasn't very enthused by the idea to turn --cc when user said -p without telling them what we are doing. In other words, if the users want combined, they should say --cc (and they will get a single-parent patch for non-merges with --cc) so there is no reason not to do this, as long as we fix --cc so that "git log --cc" implies "git log --cc -p".
Show 5 quoted lines
> Yes, that sounds sane. The current "-p -m" behavior is not useful at all. > > So if I understand rightly, we'd have: > > "-p" would be what is currently "-p --cc"
Not really.
> "-p -m" would be what is currently "-p --first-parent"
Not really. I was dropping "-m" entirely with "we could do -p -m2 but I do not think we should bother".
> "-p --no-show-merge-diffs" would be what is currently "-p"
Yes.
Show 12 quoted lines
> and the rationale would be that > > (a) the current "-p" is hiding things, and while you can add "--cc", > that requires that you really understand what is being hidden, which > is a bad default (the complaint that started this discussion) > > (b) the current "-p -m" is useless crazy stuff, and you'd rather use > it for something that you actually find very common and useful > > If so, I agree entirely. > > Linus