From: Junio C Hamano <gitster@pobox.com>
To: Andy Zhang <zhgdrx@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: understand Diff Formatting --cc flag?
Date: Wed, 16 Mar 2022 12:39:03 -0700 [thread overview]
Message-ID: <xmqqk0ctlmaw.fsf@gitster.g> (raw)
In-Reply-To: <CAJcwCMN67UMjSNqf2wbb5ZhK1QGicn7+ihneOc1XxJsdDVtvTw@mail.gmail.com> (Andy Zhang's message of "Thu, 17 Mar 2022 03:00:26 +0800")
Andy Zhang <zhgdrx@gmail.com> writes:
>> Among 5 parents, perhaps parent#1 and parent#2 had the same contents,
>> and parent#4 and parent#5 had the same contents, different from what
>> parent#1 and parent#3 had. You have 3 variants (parent#1's, #3's
>> and #4's; parent#2 has the same contents as #1, parent#5 has the
>> same contents as #4).
>>
>
> [Andy wrote:] as per your comments, The 3 variants are indeed into the
> following 3 groups.
> My question is: why can #1 appear inside multiple groups? A and B.
> <group-A> parent#1, #3, #4;
> <group-B> parent#2, #1;
> <group-C> parent#5, #4;
The three variants in my sample scenario were (A) used by #1, (B)
used by #3, and (C) used by #4. #2 uses (A) and #5 uses (C).
The contents of #1 does appear twice, in #1 itself and also in #2.
That is what "#2 has the same contents as #1" means.
> [Andy wrote:] can I explain "--cc" flag as:
> "--cc lists only either hunks which were modified from all parents, or
> hunks which were modified from at least two parents and they had
> different variants"
I do not have time to see if that matches the official explanation
found in "git diff --help", which I just re-read and I think it
gives the right definition.
prev parent reply other threads:[~2022-03-16 19:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 11:36 understand Diff Formatting --cc flag? Andy Zhang
2022-03-16 16:04 ` Junio C Hamano
2022-03-16 18:57 ` Andy Zhang
2022-03-16 19:00 ` Andy Zhang
2022-03-16 19:39 ` Junio C Hamano [this message]
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=xmqqk0ctlmaw.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=zhgdrx@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).