From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Olaf Hering <olaf@aepfle.de>, John Keeping <john@keeping.me.uk>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: git log fails to show all changes for a file
Date: Wed, 15 Jul 2015 12:22:32 -0700 [thread overview]
Message-ID: <xmqqpp3tw7if.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150715185717.GA11146@peff.net> (Jeff King's message of "Wed, 15 Jul 2015 11:57:18 -0700")
Jeff King <peff@peff.net> writes:
> On Wed, Jul 15, 2015 at 11:17:50AM -0700, Junio C Hamano wrote:
>
>> > 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".
>
> Like you, I frequently use "--first-parent -m". If I understand your
> proposal, a regular "git log" would have the first-parent-diff behavior
> of those options, but still traverse other parents.
>
> One oddity of that proposal is that the user ends up seeing any given
> change on a side-branch _twice_. Once in the original commit that
> introduced it, and once in the merge of the branch. And commit-selection
> tools like "git log -Ssome_code" will select both, too, and they'll see
> the merge commit along with the original. I can't decide if that's a
> good thing or not.
Hmm, you are right. That may be a problem, and Linus's makes tons
of practical sense (especially for us experienced Git users).
It just is that '-p', that clearly stands for 'patch' but does more
than 'patch' to produce something that cannot be fed to 'apply' by
defaulting to '--cc', makes me hesitate. By making it a lot more
convenient for experienced people who understand these issues, I
have this suspicion that it would make the options less orthgonal
and harder to explain to new people.
next prev parent reply other threads:[~2015-07-15 19:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-14 7:30 git log fails to show all changes for a file Olaf Hering
2015-07-14 7:45 ` John Keeping
2015-07-14 7:59 ` Olaf Hering
2015-07-14 17:54 ` Andreas Schwab
2015-07-14 19:16 ` Linus Torvalds
2015-07-15 16:29 ` Junio C Hamano
2015-07-15 17:13 ` Linus Torvalds
2015-07-15 17:58 ` Junio C Hamano
2015-07-15 18:11 ` Linus Torvalds
2015-07-15 18:17 ` Junio C Hamano
2015-07-15 18:57 ` Jeff King
2015-07-15 19:22 ` Junio C Hamano [this message]
2015-07-15 19:17 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqpp3tw7if.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=john@keeping.me.uk \
--cc=olaf@aepfle.de \
--cc=peff@peff.net \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.