{"thread":{"id":"2367","subject":"Re: Check for differents trees","startedAt":"2005-11-06T19:02:49Z","lastAt":"2005-11-08T17:13:55Z","messageCount":2,"participants":["Marco Costalba","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"11213","messageId":"20051106190249.39384.qmail@web26314.mail.ukl.yahoo.com","threadId":"2367","inReplyTo":null,"subject":"Re: Check for differents trees","fromName":"Marco Costalba","fromEmail":"mcostalba@yahoo.it","sentAt":"2005-11-06T19:02:49Z","receivedAt":"2005-11-06T19:02:49Z","isPatch":false,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"Junio C Hamano wrote:\n\n>>The problem is that if sha1 and sha2 correspond to very\n>>\"distant\" revision the output of git-diff-tree can be very\n>>long and also usless as long as I stop searching at first\n>>match.\n>\n>\n>Perhaps\n>\n>\t$ git-diff-tree -r --name-status --diff-filter=AD sha1 sha2\n>\n>would help you somewhat?  This would not make the diff\n>generation part quicker, but at least you do not have to parse\n>other types of changes.\n>\n\nThanks Junio,\n\n   as you said, the speed is almost the same but your way is clearly better.\n\nI have pushed the change.\n\nP.S.: Could be interesting something like?:\n     \n          git-diff-tree -r --name-status --diff-filter=^M sha1 sha2\n\n\n                          -------------------\n\n>Dscho says:\n>\n>if you want to know if tree1 and tree2 have *exactly* the same files, you \n>only have to compare the sha1 of the two trees. If they are equal you are \n>virtually guaranteed that the two trees contain the same files.\n\n\nI have impemented a tree viewer inside qgit. Tree view is updated when user browses through\nrevisions.\n\nLoading the file names of a given tree, altough only for the open directories, is an expensive\noperation. So I added a little \"same files\" test to skip tree reloading.\n\nWith \"same files\" I mean that the file list is the same bewteen tree1 and tree1, _not_ that the\nfiles content are the same. As example, if tree1 is parent of tree2 (and tree2 is not a merge) and\nthe revision between the two only modified files (git-diff-tree status is M), in my test tree1 and\ntree2 have the same files, also if sha's are, of course, different.\n\nPut in other way, two trees have the \"same files\" if I don't have to repaint the tree view window.\n\n  Marco\n \n\n\n\t\n\t\t\n__________________________________ \nYahoo! Mail - PC Magazine Editors' Choice 2005 \nhttp://mail.yahoo.com\n"},{"id":"11333","messageId":"7vhdanhxkc.fsf@assigned-by-dhcp.cox.net","threadId":"2367","inReplyTo":"20051106190249.39384.qmail@web26314.mail.ukl.yahoo.com","subject":"Re: Check for differents trees","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-08T17:13:55Z","receivedAt":"2005-11-08T17:13:55Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Marco Costalba <mcostalba@yahoo.it> writes:\n\n>    as you said, the speed is almost the same but your way is clearly better.\n\nHow often do you do this --diff-filter=AD and why?\n\nIf it is a common enough operation, we could add a specific hack\nto stop feeding the diff machinery with unwanted kind of changes\nwhen diff-filter is set and none of -B/-C/-M are used.  That\n_might_ speed things up for you.\n"}]}