{"thread":{"id":"5306","subject":"[RFC diff-tree -c with copy/rename]","startedAt":"2006-08-17T11:02:06Z","lastAt":"2006-08-18T04:09:16Z","messageCount":2,"participants":["Marco Costalba","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"25480","messageId":"e5bfff550608170402w25b9eaeaqe69665bdddaead3c@mail.gmail.com","threadId":"5306","inReplyTo":null,"subject":"[RFC diff-tree -c with copy/rename]","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2006-08-17T11:02:06Z","receivedAt":"2006-08-17T11:02:06Z","isPatch":false,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":">From current git tree:\n\n$ git-diff-tree -r -m -C bb266cb118 (I removed extra useless lines)\n\nbb266cb11842f76712ebff1d8b1bd086dc65337f\n:100644 100644 dfb1c44 8d0dbad R093\tcheckout-index.c\tbuiltin-checkout-index.c\n:100644 100644 357970d 7d39d9b R083\tverify-pack.c\tbuiltin-verify-pack.c\n:100644 100644 6484cb9 6484cb9 R100\tbuiltin-help.c\thelp.c\n\nbb266cb11842f76712ebff1d8b1bd086dc65337f\n:100644 100644 29ea6fd 8d0dbad M\tbuiltin-checkout-index.c\n:100644 100644 d700761 7d39d9b M\tbuiltin-verify-pack.c\n:100644 100644 7a7f775 6484cb9 M\thelp.c\n\n\n$ git-diff-tree -r -c -C bb266cb118\n\nbb266cb11842f76712ebff1d8b1bd086dc65337f\n::100644 100644 100644 dfb1c44 29ea6f 8d0dbad RM\tbuiltin-checkout-index.c\n::100644 100644 100644 357970d d70076 7d39d9b RM\tbuiltin-verify-pack.c\n::100644 100644 100644 6484cb9 7a7f77 6484cb9 RM\thelp.c\n\nIs it correct do not show in -c case:\n\n- the similarity value\n- the origin file:\n\nAs example\n\n'R093MM\tcheckout-index.c builtin-checkout-index.c'\n\n instead of current\n\n'RM\tbuiltin-checkout-index.c'\n\n\nThanks\nMarco\n\nP.S: -c with --stat gives both origin and destination files\n(checkout-index.c and builtin-checkout-index.c):\n\n$ git-diff-tree -r -c -C --stat bb266cb118\nbb266cb11842f76712ebff1d8b1bd086dc65337f\n Makefile                                     |   81 +++++++++++++++---------\n checkout-index.c => builtin-checkout-index.c |   26 ++++----\n builtin-count.c => builtin-count-objects.c   |    0\n name-rev.c => builtin-name-rev.c             |    4 +\n pack-objects.c => builtin-pack-objects.c     |    4 +\n symbolic-ref.c => builtin-symbolic-ref.c     |    4 +\n unpack-objects.c => builtin-unpack-objects.c |    7 +-\n verify-pack.c => builtin-verify-pack.c       |   15 ++---\n builtin.h                                    |   80 ++++++++++++------------\n git.c                                        |   86 ++++++++++++++------------\n builtin-help.c => help.c                     |    0\n 11 files changed, 166 insertions(+), 141 deletions(-)\n"},{"id":"25518","messageId":"7v3bbuelcj.fsf@assigned-by-dhcp.cox.net","threadId":"5306","inReplyTo":"e5bfff550608170402w25b9eaeaqe69665bdddaead3c@mail.gmail.com","subject":"Re: [RFC diff-tree -c with copy/rename]","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-08-18T04:09:16Z","receivedAt":"2006-08-18T04:09:16Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Marco Costalba\" <mcostalba@gmail.com> writes:\n\n> As example\n>\n> 'R093MM\tcheckout-index.c builtin-checkout-index.c'\n>\n> instead of current\n>\n> 'RM\tbuiltin-checkout-index.c'\n\nI am not particularly opposed to have an option to do this.  I\noriginally did not show this because I did not particularly find\nit interesting (and I still don't).  The output would become a\nvery long line, not for human consumption, though.\n\nBut it should not be too involved if you want to do this.  We\nalready compute all the information necessary to do so before\ncombine-diff.c::intersect_paths() converts the usual <from,to>\nrepresentation (struct diff_filepair) into <result, list of\nparents' blobs> representation (struct combine_diff_path), which\nis used by combine-diff.c routines.\n\nWe currently do not retain that information when this conversion\nhappens to be used for the output.  You would need to add a few\nfields to record the preimage filename, similarity score and\nstatus in struct combine_diff_parent and populate them in\nintersect_paths() and adjust the output routines.\n"}]}