git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Compare two diffs on the command line?
@ 2015-09-04 18:00 Phil Susi
  2015-09-04 18:10 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Susi @ 2015-09-04 18:00 UTC (permalink / raw)
  To: git

If you have a commit that exists on two branches, in gitk you can mark 
one, then select the other and choose to compare the two.  This results 
in a diff of the two diffs, rather than a diff between the two trees, 
which include many other changes that have nothing to do with either commit.

Is there a way to do this on the command line?  I thought it would be 
git diff -c or --cc, but it doesn't seem to filter out all of the other 
differences between the branches.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Compare two diffs on the command line?
  2015-09-04 18:00 Compare two diffs on the command line? Phil Susi
@ 2015-09-04 18:10 ` Junio C Hamano
  2015-09-04 19:23   ` Phil Susi
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2015-09-04 18:10 UTC (permalink / raw)
  To: Phil Susi; +Cc: Git Mailing List

On Fri, Sep 4, 2015 at 11:00 AM, Phil Susi <psusi@ubuntu.com> wrote:
> If you have a commit that exists on two branches, in gitk you can mark one,
> then select the other and choose to compare the two.  This results in a diff
> of the two diffs, rather than a diff between the two trees, which include
> many other changes that have nothing to do with either commit.

I think you are looking for the interdiff(1) tool.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Compare two diffs on the command line?
  2015-09-04 18:10 ` Junio C Hamano
@ 2015-09-04 19:23   ` Phil Susi
  0 siblings, 0 replies; 3+ messages in thread
From: Phil Susi @ 2015-09-04 19:23 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List

On 9/4/2015 2:10 PM, Junio C Hamano wrote:
> On Fri, Sep 4, 2015 at 11:00 AM, Phil Susi <psusi@ubuntu.com> wrote:
>> If you have a commit that exists on two branches, in gitk you can mark one,
>> then select the other and choose to compare the two.  This results in a diff
>> of the two diffs, rather than a diff between the two trees, which include
>> many other changes that have nothing to do with either commit.
>
> I think you are looking for the interdiff(1) tool.

Yes, that is how I would do it before git... I was thinking there would 
be a git way of doing it, especially since it is there in gitk.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-04 19:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-04 18:00 Compare two diffs on the command line? Phil Susi
2015-09-04 18:10 ` Junio C Hamano
2015-09-04 19:23   ` Phil Susi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).