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

Re: [PATCH v3] Documentation fix: git log -p does not imply -c.

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 8, 2011, 00:21 UTC
Message-ID
<7vsjuyzckd.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1299535063-1020-1-git-send-email-haircut@gmail.com>
Adam Monsen <haircut@gmail.com> writes:
> This is really Peff's patch, I
> * fixed a typo (vie -> view)
> * am sending it as an acutal patch in case that's easier to apply than
>   a diff in an email

Thanks. Such a patch to summarize the discussion so far is greatly appreciated.

Show 17 quoted lines
>  Documentation/diff-generate-patch.txt |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt
> index 3ac2bea..5d478c1 100644
> --- a/Documentation/diff-generate-patch.txt
> +++ b/Documentation/diff-generate-patch.txt
> @@ -74,10 +74,12 @@ 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
> +produced a 'combined diff' when showing a merge. This is the default
s/produced/produce/, I think.
> +format when showing merge conflicts with linkgit:git-diff[1] or a merge
> +commit with linkgit:git-show[1]. Note also that you can view the full
> +diff with the `-m` option.

This "Note" is a bit unclear what command it applies to, isn't it? I know it applies to all the commands mentioned in the previous sentence in the paragraph, but we are not writing the documentation for me, so perhaps

	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.

Also -c and --cc are technically _not_ about "showing merge conflicts". It is about "showing a merge commit". I don't know if we want to teach the distinction in this part of the document, though.

If you resolve a conflicted merge taking the results from only one side for a given hunk, --cc won't show anything. If on the other hand, you futz with a clean merge so that your result does not match with any parent, --cc will show it.

Cf.
 http://thread.gmane.org/gmane.comp.version-control.git/89415
Previous: Adam MonsenNext: Adam Monsen
Message 14 of 26 in “frustrated forensics: hard to find diff that undid a fix”
  1. Adam MonsenMar 5, 2011
  2. Jonathan del StrotherMar 5, 2011
  3. Jakub NarebskiMar 5, 2011
  4. Jonathan NiederMar 5, 2011
  5. Jeff KingMar 5, 2011
  6. Adam MonsenMar 5, 2011
  7. 0/2 improve combined diff documentationAdam Monsen, Mar 5, 2011
  8. 1/2 documentation fix: git log -p does not imply -c.Adam Monsen, Mar 5, 2011
  9. Junio C HamanoMar 7, 2011
  10. Jeff KingMar 7, 2011
  11. Junio C HamanoMar 7, 2011
  12. Jeff KingMar 7, 2011
  13. Documentation fix: git log -p does not imply -c.Adam Monsen, Mar 7, 2011
  14. Junio C HamanoMar 8, 2011
  15. Documentation fix: git log -p does not imply -c.Adam Monsen, Mar 8, 2011
  16. Junio C HamanoMar 8, 2011
  17. Adam MonsenMar 8, 2011
  18. Junio C HamanoMar 9, 2011
  19. Adam MonsenMar 9, 2011
  20. SubmittingPatches: clean up commit message tipsAdam Monsen, Mar 9, 2011
  21. Junio C HamanoMar 9, 2011
  22. diff format documentation: clarify --cc and -cAdam Monsen, Mar 8, 2011
  23. diff format documentation: clarify --cc and -cAdam Monsen, Mar 8, 2011
  24. Jeff KingMar 8, 2011
  25. 2/2 English grammar fixes for combined diff doc.Adam Monsen, Mar 5, 2011
  26. Martin von ZweigbergkMar 5, 2011

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.