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

git show -m with a parent number

From
Anatoly Borodin <anatoly.borodin@gmail.com>
Date
Mar 27, 2016, 20:46 UTC
Message-ID
<nd9gq6$412$1@ger.gmane.org>
Hi All,

is there a good reason for `git show -m` to not accept the number of a parent of a merge commit? I can run `git show --first-parent COMMIT`, but need to write `git diff COMMIT^2 COMMIT` every time I want to diff with the second parent!

`git cherry-pick -m 2 COMMIT` works, so why can't `git log` work like that?

-- 
Mit freundlichen Grüßen,
Anatoly Borodin
Next: Jeff King
Message 1 of 5 in “git show -m with a parent number”
  1. Anatoly BorodinMar 27, 2016
  2. Jeff KingMar 28, 2016
  3. Junio C HamanoMar 28, 2016
  4. Anatoly BorodinMar 30, 2016
  5. Andreas SchwabMar 30, 2016

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.