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

[RFC] Should "log --cc" imply "log --cc -p"?

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 3, 2013, 23:10 UTC
Message-ID
<7vmwvl6lj9.fsf@alter.siamese.dyndns.org>

I think a natural way to ask reviewing the recent merges while showing tricky ones would be to say:

	$ git log --first-parent --cc master..pu

But this does not to show what I expect to see, which is an output of:

	$ git log --first-parent --cc -p master..pu

This is only a minor irritation, but I think it might make sense to make it notice the --cc in the former and turn -p on automatically.

The same for
	$ git log --cc next~3..next
which may make sense to turn into "git log -p --cc next~3..next".

When deciding if the above makes sense, there are a few things to know to be true as prerequisites for the discussion:

 * Neither of these
	$ git log --first-parent -p master..pu
	$ git log -p master..pu
   shows any patches, and it is not a bug.  No patches are shown for
   merges unless -m is given, and when -m is given, we give pairwise
   2-way diffs for the number of parents.
 * We recently tweaked this:
	$ git log --first-parent -m -p master..pu
   to omit diffs with second and later parents, as that is what the
   user wishes with --first-parent.
 * The "--cc" option, when comparing two trees (i.e. showing a
   non-merge commit), is designed to show a normal patch.  In other
   words, you can view "--cc" as a modifier when you request a patch
   output format with "-p".  For "git show", "--cc -p" is turned on
   by default, and giving "-m" explicity (i.e. "git show -m") you
   can turn it off and have it do "-m -p" instead.
Next: Michael J Gruber
Message 1 of 10 in “[RFC] Should "log --cc" imply "log --cc -p"?”
  1. Junio C HamanoFeb 3, 2013
  2. Michael J GruberFeb 4, 2013
  3. Junio C HamanoFeb 4, 2013
  4. Michael J GruberFeb 5, 2013
  5. Jeff KingFeb 5, 2013
  6. Junio C HamanoFeb 5, 2013
  7. Ævar Arnfjörð BjarmasonFeb 5, 2013
  8. Jeff KingFeb 5, 2013
  9. Ævar Arnfjörð BjarmasonFeb 5, 2013
  10. Junio C HamanoFeb 5, 2013

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.