git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] bring description of git diff --cc up to date

From
Jonathan Nieder <jrnieder@uchicago.edu>
Date
Jul 23, 2008, 03:55 UTC
Message-ID
<Pine.GSO.4.62.0807222210540.3408@harper.uchicago.edu>
In-Reply-To
<7vfxq1igh0.fsf@gitster.siamese.dyndns.org>
On Tue, 22 Jul 2008, Junio C Hamano wrote:
Show 8 quoted lines
>> +	This flag implies the '-c' option and makes the patch output
>> +	even more compact by omitting uninteresting hunks.  A hunk is
>> +	considered uninteresting if the person merging had two versions
>> +	to choose between among all of the parents and the result shows
>
> the above makes me confused into
> thinking that even if there are 47 parent versions, it is Ok if I looked
> at only two versions and picked from one of them

Here's another attempt. I grimace at the sound of it, but it might be more clear.

--- snipsnip ---
Subject: document diff --cc's long-ago-changed semantics

In February 2006 [1], the definition of "interesting hunk" for git's compact-combined diff format changed without a corresponding change in documentation. This patch brings the documentation up to date.

[1] commit bf1c32bdec8223785c779779d0a660a099f69a63
    combine-diff: update --cc "uninteresting hunks" logic
Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
---
 Documentation/git-diff-tree.txt    |   12 +++++++-----
 Documentation/rev-list-options.txt |    9 +++++----
 2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt
index 0e45b58..7f8dc5b 100644
--- a/Documentation/git-diff-tree.txt
+++ b/Documentation/git-diff-tree.txt
@@ -92,12 +92,14 @@ include::pretty-options.txt[]
 --cc::
 	This flag changes the way a merge commit patch is displayed,
 	in a similar way to the '-c' option. It implies the '-c'
-	and '-p' options and further compresses the patch output
-	by omitting hunks that show differences from only one
-	parent, or show the same change from all but one parent
-	for an Octopus merge.  When this optimization makes all
+	and '-p' options and makes the patch output
+	even more compact by omitting uninteresting hunks.  A hunk is
+	considered uninteresting if it shows no changes from at least
+	one of the parents and shows the same changes from each of the
+	parents from which it shows changes.
+	When this optimization makes all
 	hunks disappear, the commit itself and the commit log
-	message is not shown, just like in any other "empty diff" case.
+	message are not shown, just like in any other "empty diff" case.
 
 --always::
 	Show the commit itself and the commit log message even
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index b6f5d87..d75de78 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -111,10 +111,11 @@ options may be given. See linkgit:git-diff-files[1] for more options.
 
 --cc::
 
-	This flag implies the '-c' options and further compresses the
-	patch output by omitting hunks that show differences from only
-	one parent, or show the same change from all but one parent for
-	an Octopus merge.
+	This flag implies the '-c' option and makes the patch output
+	even more compact by omitting uninteresting hunks.  A hunk is
+	considered uninteresting if it shows no changes from at least
+	one of the parents and shows the same changes from each of the
+	parents from which it shows changes.
 
 -r::
 
-- 
1.5.6.3.549.g8ca11
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 8 in “Re: [PATCH] bring description of git diff --cc up to date”
  1. Jonathan NiederJul 22, 2008
  2. Junio C HamanoJul 22, 2008
  3. Junio C HamanoJul 22, 2008
  4. Jonathan NiederJul 22, 2008
  5. Junio C HamanoJul 23, 2008
  6. Jonathan NiederJul 23, 2008
  7. Junio C HamanoJul 23, 2008
  8. Jonathan NiederJul 24, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.