From: Adam Monsen <haircut@gmail.com>
To: git@vger.kernel.org
Cc: Jeff King <peff@peff.net>, Junio Hamano <gitster@pobox.com>,
Jakub Narebski <jnareb@gmail.com>,
Adam Monsen <haircut@gmail.com>
Subject: [PATCH v6] diff format documentation: clarify --cc and -c
Date: Tue, 8 Mar 2011 13:03:56 -0800 [thread overview]
Message-ID: <1299618236-17933-1-git-send-email-haircut@gmail.com> (raw)
In-Reply-To: <7vmxl5e6ur.fsf@alter.siamese.dyndns.org>
The description was unclear if -c or --cc was the default (--cc is for
some commands), and incorrectly implied that the default applies to
all diff generating commands.
Most importantly, "log" does not default to "--cc" (it defaults to
"--no-merges") and "log -p" obeys the user's wish to see non-combined
format. Only "diff" (during merge and three-blob comparison) and
"show" use --cc as the default.
The genesis of this patch was me getting frustrated trying to find
changes hidden in conflict resolutions of a merge commit. Jeff King
proposed a documentation fix. I made it into a patch, and worked on it
with Junio. See the thread "frustrated forensics: hard to find diff
that undid a fix" on the git mailing list:
http://thread.gmane.org/gmane.comp.version-control.git/168481
For more historical information about viewing merge conflict
resolutions, see this post by Linus from 2008:
http://article.gmane.org/gmane.comp.version-control.git/89415
Signed-off-by: Adam Monsen <haircut@gmail.com>
---
Please ignore v5. I forgot to include links to mailing list archives
in that version.
Documentation/diff-generate-patch.txt | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt
index 3ac2bea..c57460c 100644
--- a/Documentation/diff-generate-patch.txt
+++ b/Documentation/diff-generate-patch.txt
@@ -74,10 +74,13 @@ separate lines indicate the old and the new mode.
combined diff format
--------------------
-"git-diff-tree", "git-diff-files" and "git-diff" can take '-c' or
-'--cc' option to produce 'combined diff'. For showing a merge commit
-with "git log -p", this is the default format; you can force showing
-full diff with the '-m' option.
+Any diff-generating command can take the `-c` or `--cc` option to
+produce a 'combined diff' when showing a merge. This is the default
+format when showing merges with linkgit:git-diff[1] or
+linkgit:git-show[1]. Note also that you can give the `-m' option to any
+of these commands to force generation of diffs with individual parents
+of a merge.
+
A 'combined diff' format looks like this:
------------
--
1.7.2.3
next prev parent reply other threads:[~2011-03-08 21:04 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-05 6:20 frustrated forensics: hard to find diff that undid a fix Adam Monsen
2011-03-05 10:00 ` Jonathan del Strother
2011-03-05 11:33 ` Jakub Narebski
2011-03-05 12:51 ` Jonathan Nieder
2011-03-05 13:48 ` Jeff King
2011-03-05 14:34 ` Adam Monsen
2011-03-05 19:56 ` [PATCH 0/2] improve combined diff documentation Adam Monsen
2011-03-05 19:56 ` [PATCH 1/2] documentation fix: git log -p does not imply -c Adam Monsen
2011-03-07 0:36 ` Junio C Hamano
2011-03-07 15:47 ` Jeff King
2011-03-07 18:37 ` Junio C Hamano
2011-03-07 19:12 ` Jeff King
2011-03-07 21:57 ` [PATCH v3] Documentation " Adam Monsen
2011-03-08 0:21 ` Junio C Hamano
2011-03-08 0:49 ` [PATCH v4] " Adam Monsen
2011-03-08 19:43 ` Junio C Hamano
2011-03-08 20:46 ` Adam Monsen
2011-03-09 0:58 ` Junio C Hamano
2011-03-09 21:25 ` Adam Monsen
2011-03-09 21:27 ` [PATCH] SubmittingPatches: clean up commit message tips Adam Monsen
2011-03-09 22:20 ` Junio C Hamano
2011-03-08 20:51 ` [PATCH v5] diff format documentation: clarify --cc and -c Adam Monsen
2011-03-08 21:03 ` Adam Monsen [this message]
2011-03-08 1:19 ` [PATCH v3] Documentation fix: git log -p does not imply -c Jeff King
2011-03-05 19:56 ` [PATCH 2/2] English grammar fixes for combined diff doc Adam Monsen
2011-03-05 14:29 ` frustrated forensics: hard to find diff that undid a fix Martin von Zweigbergk
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=1299618236-17933-1-git-send-email-haircut@gmail.com \
--to=haircut@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jnareb@gmail.com \
--cc=peff@peff.net \
/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).