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

Re: Possible bug with multiple mv's and diff output

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 12, 2011, 20:45 UTC
Message-ID
<7v4o63p5b7.fsf@alter.siamese.dyndns.org>
In-Reply-To
<BANLkTin2FpQQ1qEZ41VArsRYZre9=U6SKA@mail.gmail.com>
Kent Leonard <kleonard@accurev.com> writes:
Show 10 quoted lines
> 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?

Previous: Kent Leonard
Message 2 of 2 in “Possible bug with multiple mv's and diff output”
  1. Kent LeonardApr 12, 2011
  2. Junio C HamanoApr 12, 2011

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.