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

[Q] Comparing differences introduced by two commits?

From
BFBrian Foster <brian.foster@maxim-ic.com>
Date
Aug 22, 2012, 12:10 UTC
Message-ID
<2794881.R5SsgFdXjR@laclwks004>
Hello,
 I have two commits A and B.  They are on separate branches.
 Commit A is a older version of B.  I want to see what, if
 any, differences there are between what commit A changes
 and what commit B changes.  (The relative positions of
 two commits may also differ in the two branches; that is, 
 there may have been some commit re-ordering.)
 Ideally, the contents of the commit-message are also taken
 into account (albeit things like the commit-Id, dates, and
 so on will differ and therefore should be ignored).
 I realize the history leading up to each commit can itself
 cause what the commits change to differ, even if the "net
 result" of the two commits is the same.  For my purposes,
 this is a noise issue, and I'm happy to consider A and B 
 as not causing the same changes (i.e., as being different),
 albeit if the only difference is the line numbers, then it
 would be nice to ignore that.
 In the past I've done:
    diff <(git show A) <(git show B)
 which produces rather messy output but is Ok when dealing
 with just one or two sets of A/B commits.  I now have a
 large-ist set of A/B commits, and the above is impractical.
 Some searching hasn't found any suggestions I'm too happy
 with, albeit I've very possibly overlooked something.
 Any suggestions?
cheers!
	-blf-
-- 
Brian Foster
Principal MTS, Software        |  La Ciotat, France
Maxim Integrated Products      |  Web:  http://www.maxim-ic.com/
Next: Jonathan del Strother
Message 1 of 5 in “[Q] Comparing differences introduced by two commits?”
  1. Brian FosterAug 22, 2012
  2. Jonathan del StrotherAug 22, 2012
  3. Junio C HamanoAug 22, 2012
  4. Jonathan del StrotherAug 22, 2012
  5. Brian FosterAug 24, 2012

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.