{"thread":{"id":"40275","subject":"Compare two diffs on the command line?","startedAt":"2015-09-04T18:00:36Z","lastAt":"2015-09-04T19:23:40Z","messageCount":3,"participants":["Phil Susi","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"269434","messageId":"55E9DC44.90303@ubuntu.com","threadId":"40275","inReplyTo":null,"subject":"Compare two diffs on the command line?","fromName":"Phil Susi","fromEmail":"psusi@ubuntu.com","sentAt":"2015-09-04T18:00:36Z","receivedAt":"2015-09-04T18:00:36Z","isPatch":false,"sender":{"key":"psusi@ubuntu.com","avatar":null},"body":"If you have a commit that exists on two branches, in gitk you can mark \none, then select the other and choose to compare the two.  This results \nin a diff of the two diffs, rather than a diff between the two trees, \nwhich include many other changes that have nothing to do with either commit.\n\nIs there a way to do this on the command line?  I thought it would be \ngit diff -c or --cc, but it doesn't seem to filter out all of the other \ndifferences between the branches.\n"},{"id":"269436","messageId":"CAPc5daVvXNWdAwiNKnQT45p03msTBEyBUq7y+ggRq0e95=_bAQ@mail.gmail.com","threadId":"40275","inReplyTo":"55E9DC44.90303@ubuntu.com","subject":"Re: Compare two diffs on the command line?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-09-04T18:10:11Z","receivedAt":"2015-09-04T18:10:11Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"On Fri, Sep 4, 2015 at 11:00 AM, Phil Susi <psusi@ubuntu.com> wrote:\n> If you have a commit that exists on two branches, in gitk you can mark one,\n> then select the other and choose to compare the two.  This results in a diff\n> of the two diffs, rather than a diff between the two trees, which include\n> many other changes that have nothing to do with either commit.\n\nI think you are looking for the interdiff(1) tool.\n"},{"id":"269441","messageId":"55E9EFBC.3000800@ubuntu.com","threadId":"40275","inReplyTo":"CAPc5daVvXNWdAwiNKnQT45p03msTBEyBUq7y+ggRq0e95=_bAQ@mail.gmail.com","subject":"Re: Compare two diffs on the command line?","fromName":"Phil Susi","fromEmail":"psusi@ubuntu.com","sentAt":"2015-09-04T19:23:40Z","receivedAt":"2015-09-04T19:23:40Z","isPatch":false,"sender":{"key":"psusi@ubuntu.com","avatar":null},"body":"On 9/4/2015 2:10 PM, Junio C Hamano wrote:\n> On Fri, Sep 4, 2015 at 11:00 AM, Phil Susi <psusi@ubuntu.com> wrote:\n>> If you have a commit that exists on two branches, in gitk you can mark one,\n>> then select the other and choose to compare the two.  This results in a diff\n>> of the two diffs, rather than a diff between the two trees, which include\n>> many other changes that have nothing to do with either commit.\n>\n> I think you are looking for the interdiff(1) tool.\n\nYes, that is how I would do it before git... I was thinking there would \nbe a git way of doing it, especially since it is there in gitk.\n"}]}