{"thread":{"id":"1458","subject":"Make git-rev-tree obsolete","startedAt":"2005-08-09T00:23:34Z","lastAt":"2005-08-11T22:22:31Z","messageCount":6,"participants":["Johannes Schindelin","Linus Torvalds","Junio C Hamano","Jeff Garzik","Petr Baudis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"6970","messageId":"Pine.LNX.4.63.0508090222190.4076@wgmdd8.biozentrum.uni-wuerzburg.de","threadId":"1458","inReplyTo":null,"subject":"Make git-rev-tree obsolete","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-08-09T00:23:34Z","receivedAt":"2005-08-09T00:23:34Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nJunio remarked that Jeff's git-changes-script still uses git-rev-tree, and \ntherefore it should not be removed. This patch changes git-changes-script \nover to git-rev-list:\n\n--- git-changes-script.orig\tTue Aug  9 02:21:36 2005\n+++ git-changes-script\tTue Aug  9 02:20:53 2005\n@@ -85,14 +85,14 @@\n \tbase=$(cat .git/HEAD) || exit 1\n fi\n \n-git-rev-tree $base | sort -rn  > ${tmpfile}.base\n+git-rev-list $base > ${tmpfile}.base\n if [ -n \"$remote\" ]; then\n \t[ -d $remote/.git ] || exit 1\n \tif [ -z \"$tobase\" ]; then\n \t\ttobase=$(cat $remote/.git/HEAD) || exit 1\n \tfi\n \tpushd $remote > /dev/null\n-\tgit-rev-tree $tobase | sort -rn > ${tmpfile}.remote\n+\tgit-rev-list $tobase > ${tmpfile}.remote\n \tdiff -u ${tmpfile}.base ${tmpfile}.remote | grep \"^${diffsearch}[^${diffsearch}]\" | cut -c 1- > ${tmpfile}.diff\n \trm -f ${tmpfile}.base ${tmpfile}.remote\n \tmv ${tmpfile}.diff ${tmpfile}.base\n@@ -103,7 +103,7 @@\n \n [ -s \"${tmpfile}.base\" ] || exit 0\n \n-cat ${tmpfile}.base | while read time commit parents; do\n+cat ${tmpfile}.base | while read commit; do\n \tshowcommit $commit\n \techo -e \"\\n--------------------------\"\n \n"},{"id":"6971","messageId":"Pine.LNX.4.58.0508081858120.3258@g5.osdl.org","threadId":"1458","inReplyTo":"Pine.LNX.4.63.0508090222190.4076@wgmdd8.biozentrum.uni-wuerzburg.de","subject":"Re: Make git-rev-tree obsolete","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-08-09T02:09:38Z","receivedAt":"2005-08-09T02:09:38Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 9 Aug 2005, Johannes Schindelin wrote:\n> \n> Junio remarked that Jeff's git-changes-script still uses git-rev-tree, and \n> therefore it should not be removed. This patch changes git-changes-script \n> over to git-rev-list:\n\nIt really should be totally rewritten, to take advantage of git-rev-list \nbeing able to terminate early. As it is, your conversion may work, and it \nmay give the right results, but it will suck performance-wise for all the \nsame reasons that git-rev-tree sucked: it will walk all the way down to \nthe root of the tree(s).\n\n> --- git-changes-script.orig\tTue Aug  9 02:21:36 2005\n> +++ git-changes-script\tTue Aug  9 02:20:53 2005\n> @@ -85,14 +85,14 @@\n>  \tbase=$(cat .git/HEAD) || exit 1\n>  fi\n>  \n> -git-rev-tree $base | sort -rn  > ${tmpfile}.base\n> +git-rev-list $base > ${tmpfile}.base\n>  if [ -n \"$remote\" ]; then\n>  \t[ -d $remote/.git ] || exit 1\n>  \tif [ -z \"$tobase\" ]; then\n>  \t\ttobase=$(cat $remote/.git/HEAD) || exit 1\n>  \tfi\n>  \tpushd $remote > /dev/null\n> -\tgit-rev-tree $tobase | sort -rn > ${tmpfile}.remote\n> +\tgit-rev-list $tobase > ${tmpfile}.remote\n>  \tdiff -u ${tmpfile}.base ${tmpfile}.remote | grep \"^${diffsearch}[^${diffsearch}]\" | cut -c 1- > ${tmpfile}.diff\n>  \trm -f ${tmpfile}.base ${tmpfile}.remote\n>  \tmv ${tmpfile}.diff ${tmpfile}.base\n\nIt really should do something like\n\n\t#\n\t# Make sure we see objects in the remote directory\n\t#\n\texport GIT_ALTERNATE_OBJECT_DIRECTORIES=$remote/.git/objects\n\n\t#\n\t# Get the local SHA1\n\t#\n\tlocal_ref=$(git-rev-parse --verify $base^0) || exit\n\n\t#\n\t# Get the remote SHA1\n\t#\n\tremote_ref=$(GIT_DIR=\"$remote/.git\" git-rev-parse --verify $tobase^0) || exit\n\n\t#\n\t# Ok, let it rip..\n\t#\n\tgit log $remote_ref..$local_ref\n\nto do a proper search of objects that are in $local but not in $remote, \nwithout having to traverse all the way down to the root for both.\n\n\t\tLinus\n"},{"id":"6977","messageId":"7vhddzygcp.fsf@assigned-by-dhcp.cox.net","threadId":"1458","inReplyTo":"Pine.LNX.4.63.0508090222190.4076@wgmdd8.biozentrum.uni-wuerzburg.de","subject":"Re: Make git-rev-tree obsolete","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-08-09T02:49:26Z","receivedAt":"2005-08-09T02:49:26Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Junio remarked that Jeff's git-changes-script still uses git-rev-tree, and \n> therefore it should not be removed. This patch changes git-changes-script \n> over to git-rev-list:\n\nJust to make things clear, \"Junio remarked\" that Cogito also\nseems to use it as well, so git-rev-tree is not going away.\n"},{"id":"6980","messageId":"20050809044834.GA13404@havoc.gtf.org","threadId":"1458","inReplyTo":"7vhddzygcp.fsf@assigned-by-dhcp.cox.net","subject":"Re: Make git-rev-tree obsolete","fromName":"Jeff Garzik","fromEmail":"jgarzik@pobox.com","sentAt":"2005-08-09T04:48:34Z","receivedAt":"2005-08-09T04:48:34Z","isPatch":false,"sender":{"key":"jgarzik@pobox.com","avatar":null},"body":"On Mon, Aug 08, 2005 at 07:49:26PM -0700, Junio C Hamano wrote:\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > Junio remarked that Jeff's git-changes-script still uses git-rev-tree, and \n> > therefore it should not be removed. This patch changes git-changes-script \n> > over to git-rev-list:\n> \n> Just to make things clear, \"Junio remarked\" that Cogito also\n> seems to use it as well, so git-rev-tree is not going away.\n\ngit-changes-script is basically an old Cogito script, as you can see\nfrom looking at the source code.\n\nI only use it for\n\n\tcd /repos/misc-2.6\n\tgit-changes-script -L ../linux-2.6\n\ni.e. where there are two separate trees, rather than separate branches\nthat I normally work with.\n\n\tJeff\n"},{"id":"6982","messageId":"Pine.LNX.4.63.0508091218210.6752@wgmdd8.biozentrum.uni-wuerzburg.de","threadId":"1458","inReplyTo":"7vhddzygcp.fsf@assigned-by-dhcp.cox.net","subject":"Re: Make git-rev-tree obsolete","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-08-09T10:18:43Z","receivedAt":"2005-08-09T10:18:43Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 8 Aug 2005, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > Junio remarked that Jeff's git-changes-script still uses git-rev-tree, and \n> > therefore it should not be removed. This patch changes git-changes-script \n> > over to git-rev-list:\n> \n> Just to make things clear, \"Junio remarked\" that Cogito also\n> seems to use it as well, so git-rev-tree is not going away.\n\nOops! My bad.\n"},{"id":"7084","messageId":"20050811222231.GH25280@pasky.ji.cz","threadId":"1458","inReplyTo":"7vhddzygcp.fsf@assigned-by-dhcp.cox.net","subject":"Re: Make git-rev-tree obsolete","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-08-11T22:22:31Z","receivedAt":"2005-08-11T22:22:31Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Tue, Aug 09, 2005 at 04:49:26AM CEST, I got a letter\nwhere Junio C Hamano <junkio@cox.net> told me that...\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > Junio remarked that Jeff's git-changes-script still uses git-rev-tree, and \n> > therefore it should not be removed. This patch changes git-changes-script \n> > over to git-rev-list:\n> \n> Just to make things clear, \"Junio remarked\" that Cogito also\n> seems to use it as well, so git-rev-tree is not going away.\n\nPlease note\n\n41283a6ed1924c7b3963c5455ba39911f1069682\n\tcg-mkpatch: Ditch git-rev-tree in favour of git-rev-list\n7136aa4337334a28e55c8853018423d4b780214c\n\tcg-commit: Use git-rev-list instead of git-rev-tree\n\nfrom 2005-08-05, which should remove any traces of git-rev-tree usage\nfrom Cogito. Unfortunately, I did that only after releasing Cogito-0.13,\nso you would break that particular version (first to depend on git\nexternally) by removing git-rev-tree now. But I think it's safe to kill\nafter a while (and another Cogito release, which shouldn't be far away).\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nIf you want the holes in your knowledge showing up try teaching\nsomeone.  -- Alan Cox\n"}]}