{"thread":{"id":"27076","subject":"Possible bug with multiple mv's and diff output","startedAt":"2011-04-12T17:58:49Z","lastAt":"2011-04-12T20:45:16Z","messageCount":2,"participants":["Kent Leonard","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"165699","messageId":"BANLkTin2FpQQ1qEZ41VArsRYZre9=U6SKA@mail.gmail.com","threadId":"27076","inReplyTo":null,"subject":"Possible bug with multiple mv's and diff output","fromName":"Kent Leonard","fromEmail":"kleonard@accurev.com","sentAt":"2011-04-12T17:58:49Z","receivedAt":"2011-04-12T17:58:49Z","isPatch":false,"sender":{"key":"kleonard@accurev.com","avatar":null},"body":"Hi all,\n\nWhen I do this in repo with files a and b:\n  git mv b c\n  git mv a b\n  git commit -m shuffle\n  git diff --summary master^ master\n\nI get output:\n  delete mode 100644 a\n  create mode 100644 c\nWhich does not indicate that the contents of b changed.\n\n  git diff --summary --find-copies --find-renames master^ master\ngives output\n  delete mode 100644 a\n  copy b => c (100%)\nwhich also doesn't show that b changed.\n\n\"git diff --raw\" shows more complete information.\n\nI am misunderstanding what should happen, or is this incorrect?\n\nThanks,\nKent Leonard\n"},{"id":"165711","messageId":"7v4o63p5b7.fsf@alter.siamese.dyndns.org","threadId":"27076","inReplyTo":"BANLkTin2FpQQ1qEZ41VArsRYZre9=U6SKA@mail.gmail.com","subject":"Re: Possible bug with multiple mv's and diff output","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-04-12T20:45:16Z","receivedAt":"2011-04-12T20:45:16Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Kent Leonard <kleonard@accurev.com> writes:\n\n> When I do this in repo with files a and b:\n>   git mv b c\n>   git mv a b\n>   git commit -m shuffle\n>   git diff --summary master^ master\n>\n> I get output:\n>   delete mode 100644 a\n>   create mode 100644 c\n> Which does not indicate that the contents of b changed.\n\nIsn't that because --summary is only about tree-structural changes?  If b\nwas in preimage and b still is in postimage, as far as b is concerned that\npath stayed in the tree across the change, and there is nothing to report.\n\n> \"git diff --raw\" shows more complete information.\n\nTry something more sensible like \"--summary --stat\" instead of \"--summary\"\nalone, perhaps?\n"}]}