# Possible bug with multiple mv's and diff output

2 messages from 2011-04-12 to 2011-04-12. Participants: Kent Leonard, Junio C Hamano.
Thread: https://gitlist.dev/t/27076

## Kent Leonard, 2011-04-12 17:58

Subject: Possible bug with multiple mv's and diff output
Message-ID: <BANLkTin2FpQQ1qEZ41VArsRYZre9=U6SKA@mail.gmail.com>
URL: https://gitlist.dev/e/BANLkTin2FpQQ1qEZ41VArsRYZre9%3DU6SKA%40mail.gmail.com

```
Hi all,

When I do this in repo with files a and b:
  git mv b c
  git mv a b
  git commit -m shuffle
  git diff --summary master^ master

I get output:
  delete mode 100644 a
  create mode 100644 c
Which does not indicate that the contents of b changed.

  git diff --summary --find-copies --find-renames master^ master
gives output
  delete mode 100644 a
  copy b => c (100%)
which also doesn't show that b changed.

"git diff --raw" shows more complete information.

I am misunderstanding what should happen, or is this incorrect?

Thanks,
Kent Leonard

```

## Junio C Hamano, 2011-04-12 20:45

Subject: Re: Possible bug with multiple mv's and diff output
Message-ID: <7v4o63p5b7.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v4o63p5b7.fsf%40alter.siamese.dyndns.org
In-Reply-To: <BANLkTin2FpQQ1qEZ41VArsRYZre9=U6SKA@mail.gmail.com>

```
Kent Leonard <kleonard@accurev.com> writes:

> When I do this in repo with files a and b:
>   git mv b c
>   git mv a b
>   git commit -m shuffle
>   git diff --summary master^ master
>
> I get output:
>   delete mode 100644 a
>   create mode 100644 c
> Which does not indicate that the contents of b changed.

Isn't that because --summary is only about tree-structural changes?  If b
was in preimage and b still is in postimage, as far as b is concerned that
path stayed in the tree across the change, and there is nothing to report.

> "git diff --raw" shows more complete information.

Try something more sensible like "--summary --stat" instead of "--summary"
alone, perhaps?

```
