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

[PATCH 0/3] Showing merges easier with "git log"

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 20, 2015, 22:43 UTC
Message-ID
<1440110591-12941-1-git-send-email-gitster@pobox.com>
This is a combination of two closely related topics.
 - The second patch is my long-time pet peeve (it is even on the
   leftover-bits list at git-blame blog).  When inspecting a branch,
   I often type "git log --first-parent --cc master..", and then
   realize that I need to give "-p" to actually view the condensed
   patch.  We do the same for "log -c" (combined but not desified
   form).
 - The third one is about "git log --cc master..", with which the
   user is clearly telling us that s/he wants to see interesting
   changes for both single-parent commits and for merges (otherwise
   s/he wouldn't be saying "--cc" in the first place).  Even with
   the second one that makes "--cc" imply "-p" unless another patch
   output format (e.g. "--raw") was asked, you'd need "-m", which
   was irritating.
The latter was inspired by a recent discussion, most notably
   http://thread.gmane.org/gmane.comp.version-control.git/273937/focus=273988

but implements it with a much less UI impact. Tweaking "git log -p" has a lot of fallout---interested parties can try it out and how two tests in t4xxx series break. Doing this for "log --cc" is conceptually cleaner, as "-p" does not tell us what the user wants to see for merges (nothing? first-parent diff? pairwise diff? combined?), but "--cc" is a clear indication that dense combined patch is desired.

Note that this conflicts with 'tr/remerge-diff' topic that has been stalled on 'pu' for quite some time. I'll tentatively drop that other topic before pushing out today's integration result. People who are interested in that topic may want to help resurrect and reroll it. Hint, hint...

Junio C Hamano (3):
  log: rename "tweak" helpers
  log: when --cc is given, default to -p unless told otherwise
  log: show merge commit when --cc is given
 builtin/log.c | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)
-- 
2.5.0-546-gb1bbc0d
Next: Junio C Hamano
Message 1 of 6 in “Showing merges easier with "git log"”
  1. 0/3 Showing merges easier with "git log"Junio C Hamano, Aug 20, 2015
  2. 1/3 log: rename "tweak" helpersJunio C Hamano, Aug 20, 2015
  3. 2/3 log: when --cc is given, default to -p unless told otherwiseJunio C Hamano, Aug 20, 2015
  4. 3/3 log: show merge commit when --cc is givenJunio C Hamano, Aug 20, 2015
  5. 4/3 builtin/log.c: minor reformatJunio C Hamano, Aug 21, 2015
  6. log: make '-p' imply '-m --cc'Junio C Hamano, Aug 21, 2015

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.