{"thread":{"id":"3235","subject":"[RFD] diff-tree -c (not --cc) in diff-raw format?","startedAt":"2006-02-04T00:18:38Z","lastAt":"2006-02-04T06:39:33Z","messageCount":3,"participants":["Junio C Hamano","Marco Costalba"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"15542","messageId":"7vfyn0asdd.fsf@assigned-by-dhcp.cox.net","threadId":"3235","inReplyTo":null,"subject":"[RFD] diff-tree -c (not --cc) in diff-raw format?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-02-04T00:18:38Z","receivedAt":"2006-02-04T00:18:38Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The second paragraph from this log caught my attention:\n\n    commit cb80775b530a8a340a7f9e4fecc8feaaac13777c\n    Author: Marco Costalba <mcostalba@gmail.com>\n    Date:   Sun Jan 29 12:27:34 2006 +0100\n\n        Use git-diff-tree -c (combined) option to retrieve merge's\n        file list\n\n        Change un-interesting files pruning algorithm to use native\n        git-diff-tree -c option when showing merge files in files\n        list box.\n\nThe current diff-tree -c is rather expensive way to do this.  I\nmade both -c and --cc to always produce patches, but this\nsuggests at least qgit would benefit if I allow -c in diff-raw\nformat.  Essentially, you are interested in paths that the\nresults do not match _any_ of the parents.\n\nSo instead of 70 lines output from\n\n\t$ git-diff-tree -m -r --abbrev v1.0.0\n\nI could give you:\n\n        $ git-diff-tree -c -m -r --abbrev v1.0.0\n        c2f3bf071ee90b01f2d629921bb04c4f798f02fa\n        :100644 100644 92cfee4... e9bf860... M\tMakefile\n        :100644 100644 d36904c... 4fa6c16... M\tdebian/changelog\n        c2f3bf071ee90b01f2d629921bb04c4f798f02fa\n        :100644 100644 50392ff... e9bf860... M\tMakefile\n        :100644 100644 376f0fa... 4fa6c16... M\tdebian/changelog\n\nor even:\n\n        $ git-diff-tree -c -m -r --name-only v1.0.0\n        c2f3bf071ee90b01f2d629921bb04c4f798f02fa\n        Makefile\n        debian/changelog\n\nI am not so sure which one is more useful, though.  What do you\nthink?\n\nOn the other hand, git-diff-tree --cc needs to look at the diff\nbetween result and parents of the merge in order to do its job\nhunk-per-hunk, so producing diff-raw output fundamentally does\nnot make sense for that option.\n\nI should keep track of qgit repository more often but I haven't\nbeen doing so because the site used to be almost unpullable over\nhttp (it seems to work just fine these days so it is not an\nexcuse for me anymore) and I do not read C++ too well (bad\nexcuse perhaps but still an excuse for me).\n"},{"id":"15554","messageId":"e5bfff550602032218s72f91151tb8f6fcda373c2a28@mail.gmail.com","threadId":"3235","inReplyTo":"7vfyn0asdd.fsf@assigned-by-dhcp.cox.net","subject":"Re: [RFD] diff-tree -c (not --cc) in diff-raw format?","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2006-02-04T06:18:35Z","receivedAt":"2006-02-04T06:18:35Z","isPatch":false,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On 2/4/06, Junio C Hamano <junkio@cox.net> wrote:\n> The second paragraph from this log caught my attention:\n>\n>     commit cb80775b530a8a340a7f9e4fecc8feaaac13777c\n>     Author: Marco Costalba <mcostalba@gmail.com>\n>     Date:   Sun Jan 29 12:27:34 2006 +0100\n>\n>         Use git-diff-tree -c (combined) option to retrieve merge's\n>         file list\n>\n>         Change un-interesting files pruning algorithm to use native\n>         git-diff-tree -c option when showing merge files in files\n>         list box.\n>\n> The current diff-tree -c is rather expensive way to do this.  I\n> made both -c and --cc to always produce patches, but this\n> suggests at least qgit would benefit if I allow -c in diff-raw\n> format.  Essentially, you are interested in paths that the\n> results do not match _any_ of the parents.\n>\n\nYes. that would be great!\n\nIf you look at the patch you see I actually run something like this\n\n         git-diff-tree -c <sha> | grep \"diff --combined\"\n\nto get the 'interesting' file list.\n\n> So instead of 70 lines output from\n>\n>         $ git-diff-tree -m -r --abbrev v1.0.0\n>\n> I could give you:\n>\n>         $ git-diff-tree -c -m -r --abbrev v1.0.0\n>         c2f3bf071ee90b01f2d629921bb04c4f798f02fa\n>         :100644 100644 92cfee4... e9bf860... M  Makefile\n>         :100644 100644 d36904c... 4fa6c16... M  debian/changelog\n>         c2f3bf071ee90b01f2d629921bb04c4f798f02fa\n>         :100644 100644 50392ff... e9bf860... M  Makefile\n>         :100644 100644 376f0fa... 4fa6c16... M  debian/changelog\n>\n> or even:\n>\n>         $ git-diff-tree -c -m -r --name-only v1.0.0\n>         c2f3bf071ee90b01f2d629921bb04c4f798f02fa\n>         Makefile\n>         debian/changelog\n>\n> I am not so sure which one is more useful, though.  What do you\n> think?\n>\n\nThe first one without --abbrev option\n\n git-diff-tree -c -m -r c2f3bf071ee90b01f2d629921bb04c4f798f02fa\n\nSo to recycle my common diff-tree parsing code. Peraphs better, if possible,\nI would suggest to treat -c option as all the other options, so to be possible\nto use something like\n\ngit-diff-tree -c -r c2f3bf071ee90b01f2d629921bb04c4f798f02fa\ngit-diff-tree -c -r --name-only v1.0.0\ngit-diff-tree -c -r --abbrev v1.0.0\ngit-diff-tree -c -r c2f3bf071ee90b01f2d629921bb04c4f798f02fa  foo.c\n\nand so on....\n\nAs you see -c _could_ imply -m\n\nThe current -c behaviour _could_ be obtained with\n\ngit-diff-tree -c -r -p <sha>\n\nI didn't check the combined code to see if what I suggest is easy/possible.\n\n> I should keep track of qgit repository more often but I haven't\n> been doing so because the site used to be almost unpullable over\n> http (it seems to work just fine these days so it is not an\n> excuse for me anymore) and I do not read C++ too well (bad\n> excuse perhaps but still an excuse for me).\n>\n>\n\nNo problem, I do not read C++ too well too. ;-)\n\nMarco\n"},{"id":"15555","messageId":"7v4q3f8w62.fsf@assigned-by-dhcp.cox.net","threadId":"3235","inReplyTo":"e5bfff550602032218s72f91151tb8f6fcda373c2a28@mail.gmail.com","subject":"Re: [RFD] diff-tree -c (not --cc) in diff-raw format?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-02-04T06:39:33Z","receivedAt":"2006-02-04T06:39:33Z","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 you see -c _could_ imply -m\n\nIn case it was not clear, it already implies -m and does not\nskip merges even if you do not give -m.  Otherwise you would not\nsee anything without saying \"diff-tree -c -m' to begin with.\n"}]}