git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* understand Diff Formatting --cc flag?
@ 2022-03-16 11:36 Andy Zhang
  2022-03-16 16:04 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Zhang @ 2022-03-16 11:36 UTC (permalink / raw)
  To: git

understand Diff Formatting --cc flag?

hi,

  It is really too hard to understand Diff Formatting --cc flag.

  It is hard to understand"...hunks whose contents in the parents have
only two variants..".

  My question is:
   1)what does "variant" mean here?
   2)what about all the other cases? 0 variants, 1 variants, and 3
variants and even more?

   3)Can I understand "--cc" as simply as: "--cc lists only hunks
which were modified from all parents."


  Any comments, hinits are welcome!  Thank you in advance!


//---------------------------------------------------------------------
Here is the help from the command: git help log

   Diff Formatting
       Listed below are options that control the formatting of diff
output. Some of them are specific to git-rev-list(1), however other
diff options may be given. See git-diff-files(1) for more options.

       -c
           With this option, diff output for a merge commit shows the
differences from each of the parents to the merge result
simultaneously instead of showing pairwise diff between a parent and
the
           result one at a time. Furthermore, it lists only files
which were modified from all parents.

       --cc
           This flag implies the -c option and further compresses the
patch output by omitting uninteresting hunks whose contents in the
parents have only two variants and the merge result picks one of
           them without modification.

       -m
           This flag makes the merge commits show the full diff like
regular commits; for each merge parent, a separate log entry and diff
is generated. An exception is that only diff against the first
           parent is shown when --first-parent option is given; in
that case, the output represents the changes the merge brought into
the then-current branch.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-16 19:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).