{"thread":{"id":"2391","subject":"git-rev-tree","startedAt":"2005-11-08T02:12:32Z","lastAt":"2005-11-08T04:55:06Z","messageCount":6,"participants":["Dave Jones","Linus Torvalds","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"11293","messageId":"20051108021232.GB10835@redhat.com","threadId":"2391","inReplyTo":null,"subject":"git-rev-tree","fromName":"Dave Jones","fromEmail":"davej@redhat.com","sentAt":"2005-11-08T02:12:32Z","receivedAt":"2005-11-08T02:12:32Z","isPatch":false,"sender":{"key":"davej@redhat.com","avatar":null},"body":"Can someone remind me what the deprecated git-rev-tree command did,\nor how this should be fixed up to use newer git commands?\n\nI'm trying to get git-changes-script working, but all the\nvariants I've found on the web use this deprecated tool.\n\nAny clues ?\n\n\t\tDave\n"},{"id":"11294","messageId":"Pine.LNX.4.64.0511071819510.3247@g5.osdl.org","threadId":"2391","inReplyTo":"20051108021232.GB10835@redhat.com","subject":"Re: git-rev-tree","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-11-08T02:33:30Z","receivedAt":"2005-11-08T02:33:30Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Mon, 7 Nov 2005, Dave Jones wrote:\n>\n> Can someone remind me what the deprecated git-rev-tree command did,\n> or how this should be fixed up to use newer git commands?\n\nIt was basically the same as \"git-rev-list\", except:\n\n - it output the date (as a raw number) in front, so pretty much everybody \n   ended up using \"cut\" to remove it, sometimes after sorting the output \n   numerically.\n\n   Sorting numerically is unnecessary with git-rev-list, since the output \n   is already sorted (not necessarily exactly by date, but by \"recency\" \n   and/or by other even stricter sorting rules)\n\n - it was limited to a certain number of heads maximum (I forget, but I \n   think it was 16).\n\n - it parsed the whole tree before outputting anything.\n\n> I'm trying to get git-changes-script working, but all the\n> variants I've found on the web use this deprecated tool.\n\nThe git-changes-script was pretty broken.\n\nYou're _much_ better off doing it by:\n\n - fetch the \"remote\" branch into the local repository. The \n   \"git-changes-script\" thing required that you fetch the remote branch \n   into _another_ repository, but still local. These days, just use a \n   local branch in the same repo.\n\n   So, for example, tracking my tree\n\n\texport KERNEL=master.kernel.org:/pub/scm/linux/kernel/git/\n\tgit fetch $KERNEL/torvalds/linux-2.6 master:linus\n\n   which will just fetch my \"master\" branch into the local \"linus\" branch.\n\n - then just do\n\n\tgit log linus..HEAD\n\n   and you'll see exactly what you wanted: what exists in your HEAD but \n   not in mine.\n\nNo complex script required.\n\nNow, I've told some people that the diffstat is just the same (ie using a \nsimple \"git diff linus..HEAD | git-apply --stat\") but that was because \nI've been muching some really awesomely bad 'shrooms. Clearly that doesn't \nwork well at all, since it will show all the stuff I have in my branch \nreversed (since your head doesn't have it). \n\nThe way to get a diff is really to do a merge, and throw the merge away \nafter creating the diff. Ie something like this should work:\n\n\tgit checkout -b merge-branch\n\tgit merge \"dummy merge\" master linus &&\n\t\tgit-diff linus.. | git-apply --stat\n\tgit checkout -f master\n\tgit branch -D merge-branch\n\nwhich will also tell you if the merge failed (in which case you might not \nwant to send me a \"please pull\", but instead try the merge locally and fix \nit up, and then try again)\n\nAll of the above is obviously totally untested.\n\n\t\tLinus\n"},{"id":"11297","messageId":"20051108025755.GA22243@redhat.com","threadId":"2391","inReplyTo":"Pine.LNX.4.64.0511071819510.3247@g5.osdl.org","subject":"Re: git-rev-tree","fromName":"Dave Jones","fromEmail":"davej@redhat.com","sentAt":"2005-11-08T02:57:55Z","receivedAt":"2005-11-08T02:57:55Z","isPatch":false,"sender":{"key":"davej@redhat.com","avatar":null},"body":"On Mon, Nov 07, 2005 at 06:33:30PM -0800, Linus Torvalds wrote:\n\n > \texport KERNEL=master.kernel.org:/pub/scm/linux/kernel/git/\n > \tgit fetch $KERNEL/torvalds/linux-2.6 master:linus\n > \n >    which will just fetch my \"master\" branch into the local \"linus\" branch.\n > \n >  - then just do\n > \n > \tgit log linus..HEAD\n > \n >    and you'll see exactly what you wanted: what exists in your HEAD but \n >    not in mine.\n > \n > No complex script required.\n\nOk, I must be doing something totally bone-headed.  Because this is what\nI tried to do before I headed down the path of making that script work.\n\nDoing the above yields ...\n\n(18:47:37:davej@hera:agp2)$ export KERNEL=master.kernel.org:/pub/scm/linux/kernel/git/\n(18:47:43:davej@hera:agp2)$ git fetch $KERNEL/torvalds/linux-2.6 master:linus\ndavej@master.kernel.org's password:\nPacking 35335 objects\nUnpacking 35335 objects\n 100% (35335/35335) done\n* committish: d27ba47e7e8c466c18983a1779d611f82d6a354f\n  branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git//torvalds/linux-2.6\n* refs/heads/linus: storing branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git//torvalds/linux-2.6\n\nwhich looks ok, but then when I do the git log linus..HEAD, I get no output at all.\n\nWhatever I'm doing wrong, I'm doing it consistently, as this happens\nin all my trees both locally, and on k.o\n\n*click*, ahh wait, I didn't have a 'linus' branch before I did that fetch.\nFor the above to work, do I need there to be a 'linus' branch before\nI start making changes ?  Or am I barking up the wrong tree ?\n\n\t\tDave\n"},{"id":"11299","messageId":"Pine.LNX.4.64.0511071934410.3247@g5.osdl.org","threadId":"2391","inReplyTo":"20051108025755.GA22243@redhat.com","subject":"Re: git-rev-tree","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-11-08T03:35:55Z","receivedAt":"2005-11-08T03:35:55Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Mon, 7 Nov 2005, Dave Jones wrote:\n> \n> (18:47:37:davej@hera:agp2)$ export KERNEL=master.kernel.org:/pub/scm/linux/kernel/git/\n> (18:47:43:davej@hera:agp2)$ git fetch $KERNEL/torvalds/linux-2.6 master:linus\n> davej@master.kernel.org's password:\n> Packing 35335 objects\n> Unpacking 35335 objects\n>  100% (35335/35335) done\n> * committish: d27ba47e7e8c466c18983a1779d611f82d6a354f\n>   branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git//torvalds/linux-2.6\n> * refs/heads/linus: storing branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git//torvalds/linux-2.6\n> \n> which looks ok, but then when I do the git log linus..HEAD, I get no output at all.\n\nYou've got the right \"linus\" commit.\n\nHowever, are you aware that I did pull from you? If you don't have \nanything new, \"no output at all\" is the right thing.\n\n> *click*, ahh wait, I didn't have a 'linus' branch before I did that fetch.\n> For the above to work, do I need there to be a 'linus' branch before\n> I start making changes ?  Or am I barking up the wrong tree ?\n\nNo, the above will have created the \"linus\" branch as needed.\n\n\t\tLinus\n"},{"id":"11301","messageId":"20051108034345.GA25199@redhat.com","threadId":"2391","inReplyTo":"Pine.LNX.4.64.0511071934410.3247@g5.osdl.org","subject":"Re: git-rev-tree","fromName":"Dave Jones","fromEmail":"davej@redhat.com","sentAt":"2005-11-08T03:43:45Z","receivedAt":"2005-11-08T03:43:45Z","isPatch":false,"sender":{"key":"davej@redhat.com","avatar":null},"body":"On Mon, Nov 07, 2005 at 07:35:55PM -0800, Linus Torvalds wrote:\n > \n > \n > On Mon, 7 Nov 2005, Dave Jones wrote:\n > > \n > > (18:47:37:davej@hera:agp2)$ export KERNEL=master.kernel.org:/pub/scm/linux/kernel/git/\n > > (18:47:43:davej@hera:agp2)$ git fetch $KERNEL/torvalds/linux-2.6 master:linus\n > > davej@master.kernel.org's password:\n > > Packing 35335 objects\n > > Unpacking 35335 objects\n > >  100% (35335/35335) done\n > > * committish: d27ba47e7e8c466c18983a1779d611f82d6a354f\n > >   branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git//torvalds/linux-2.6\n > > * refs/heads/linus: storing branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git//torvalds/linux-2.6\n > > \n > > which looks ok, but then when I do the git log linus..HEAD, I get no output at all.\n > \n > You've got the right \"linus\" commit.\n > \n > However, are you aware that I did pull from you? If you don't have \n > anything new, \"no output at all\" is the right thing.\n\nI only just saw my changes turn up on the commits list, so I was\ncompletely unaware until now.  Hohum.\n\nI'll figure it out next time I have something for you to pull again :)\n\nthanks,\n\n\t\tDave\n"},{"id":"11303","messageId":"7vr79roi1h.fsf@assigned-by-dhcp.cox.net","threadId":"2391","inReplyTo":"20051108021232.GB10835@redhat.com","subject":"Re: git-rev-tree","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-08T04:55:06Z","receivedAt":"2005-11-08T04:55:06Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dave Jones <davej@redhat.com> writes:\n\n> Can someone remind me what the deprecated git-rev-tree command did,\n> or how this should be fixed up to use newer git commands?\n\nAlternatively, can somebody comment on the git-changes in the\n\"pu\" branch?\n"}]}