# Finding changes in one branch not in two other branch

2 messages from 2008-04-15 to 2008-04-15. Participants: Aneesh Kumar, Junio C Hamano.
Thread: https://gitlist.dev/t/13121

## Aneesh Kumar, 2008-04-15 11:21

Subject: Finding changes in one branch not in two other branch
Message-ID: <cc723f590804150421j689ef4b1o57b97c937e23db99@mail.gmail.com>
URL: https://gitlist.dev/e/cc723f590804150421j689ef4b1o57b97c937e23db99%40mail.gmail.com

```
Hi,

I am not sure whether it is available. What i am looking for is

git diff <commit1> <commit2> <commit3>

And it should show changes only in in tree represented by <commit1> but not
in both <commit2> and <commit3>

To show a workflow:

kernel releases 2.6.20 and the project release patchset on top of 2.6.20
kernel release 2.6.21 and project release patchset on top of 2.6.21

The second release involve some bug fixes for the project.

The intention is to find out  what changed in project with the release
of 2.6.21 patchset
. The easiest is look at diff of diff. But if git can do it for me why not ??

-aneesh

```

## Junio C Hamano, 2008-04-15 19:05

Subject: Re: Finding changes in one branch not in two other branch
Message-ID: <7viqyjx7jl.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7viqyjx7jl.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <cc723f590804150421j689ef4b1o57b97c937e23db99@mail.gmail.com>

```
"Aneesh Kumar" <aneesh.kumar@gmail.com> writes:

> To show a workflow:
>
> kernel releases 2.6.20 and the project release patchset on top of 2.6.20
> kernel release 2.6.21 and project release patchset on top of 2.6.21
>
> The second release involve some bug fixes for the project.
>
> The intention is to find out what changed in project with the release of
> 2.6.21 patchset

That depends on your definition of what a patchset is.

If it is a set of files, each file has a patch to one or more files to
implement a logically independent and complete change (i.e. corresponds to
what a commit should be), then you can run git-patch-id on each of them to
find the duplicates in these two sets (you do not need a git repository to
do this, as patch-id is a freestanding operation).

If you mean a single file that contains the difference between the vanilla
2.6.21 and their version, then you cannot do much better than running
interdiff, I'd guess.
 

```
