{"thread":{"id":"1837","subject":"git-diff-stages?","startedAt":"2005-09-17T01:04:23Z","lastAt":"2005-09-17T06:13:09Z","messageCount":7,"participants":["Junio C Hamano","Linus Torvalds","Tony Luck"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"8742","messageId":"7vd5n8fqso.fsf@assigned-by-dhcp.cox.net","threadId":"1837","inReplyTo":null,"subject":"git-diff-stages?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-09-17T01:04:23Z","receivedAt":"2005-09-17T01:04:23Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Is anybody actually using this program?  If not I'd like to\ndeprecate it now and remove it before we hit 1.0.  As far as I\ncan tell it is not very useful.\n"},{"id":"8744","messageId":"7vzmqceayd.fsf@assigned-by-dhcp.cox.net","threadId":"1837","inReplyTo":"7vd5n8fqso.fsf@assigned-by-dhcp.cox.net","subject":"deprecating more","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-09-17T01:31:54Z","receivedAt":"2005-09-17T01:31:54Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> Is anybody actually using this program?  If not I'd like to\n> deprecate it now and remove it before we hit 1.0.  As far as I\n> can tell it is not very useful.\n\nThe same goes for the following programs:\n\n    git-diff-helper\n    git-diff-stages\n    git-export\n    git-rev-tree\n\nAmong them, I could be talked into keeping git-export on the\ncondition that we will add a counterpart git-import that can\nread git-export output and recreate an identical repository\n[*1*]; without something like that, I doubt its usefulness,\nespecially since \"git-whatchanged\" is far more useful for\neveryday use.\n\n[Footnote]\n\n*1* which I think actually is impossible without fixing\ngit-export first so that it exports the initial commit.  I may\nbe mistaken.\n"},{"id":"8745","messageId":"Pine.LNX.4.58.0509161856260.26803@g5.osdl.org","threadId":"1837","inReplyTo":"7vzmqceayd.fsf@assigned-by-dhcp.cox.net","subject":"Re: deprecating more","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-09-17T01:59:24Z","receivedAt":"2005-09-17T01:59:24Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 16 Sep 2005, Junio C Hamano wrote:\n> \n> Among them, I could be talked into keeping git-export on the\n> condition that we will add a counterpart git-import that can\n> read git-export output and recreate an identical repository\n\nI don't think there is any point.\n\ngit-export was done as a concept example on how easy it is to export the\ngit data to something else. It's much less powerful than ny number of\ntrivial one-liner scripts now, and real exporters would not ever use\ngit-export.\n\nIt's obviously much less powerful than \"git-whatchanged\", or just about \nany combination of git-rev-list + git-diff-tree.\n\nSo drop it.\n\n\t\tLinus\n"},{"id":"8746","messageId":"7vr7boe8a8.fsf@assigned-by-dhcp.cox.net","threadId":"1837","inReplyTo":"Pine.LNX.4.58.0509161856260.26803@g5.osdl.org","subject":"Re: deprecating more","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-09-17T02:29:35Z","receivedAt":"2005-09-17T02:29:35Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n> It's obviously much less powerful than \"git-whatchanged\", or just about \n> any combination of git-rev-list + git-diff-tree.\n>\n> So drop it.\n\nI'm happy to hear an argument to drop it, but I would like to\nmake sure that you do realize that git-whatchanged is not a\nconvenient way to truly \"export\" for later recreation of\nidentical repository, due to its indentation and truncation\nbehaviour.  Not that *I* think that matters.\n\nWhat do you think about the other commands I mentioned?\n"},{"id":"8747","messageId":"Pine.LNX.4.58.0509161938580.26803@g5.osdl.org","threadId":"1837","inReplyTo":"7vr7boe8a8.fsf@assigned-by-dhcp.cox.net","subject":"Re: deprecating more","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-09-17T02:50:35Z","receivedAt":"2005-09-17T02:50:35Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 16 Sep 2005, Junio C Hamano wrote:\n> \n> I'm happy to hear an argument to drop it, but I would like to\n> make sure that you do realize that git-whatchanged is not a\n> convenient way to truly \"export\" for later recreation of\n> identical repository, due to its indentation and truncation\n> behaviour.  Not that *I* think that matters.\n\nWell, the thing is, a true exporter probably doesn't want to use patches \nat all.\n\nA truly good exporter would likely use\n\n\tgit-diff-tree -M -r\n\nor something to generate the list of filenames and versions, and then work \non that. You really _have_ to, in order to get things like binary files \nright.\n\nAnything that is based on diffs would suck.\n\nAlso, I suspect that to get the list of commits to export, a real exporter\nis likely to first just do something like\n\n\tgit-rev-list --parents --topo-order prev..\n\nand generate the commit topology from there. Then just either use the C\nlibrary interfaces to suck in the commit messages, or just use\ngit-cat-file. And then git-diff-tree -M (or perhaps -C, if the\nrepo-to-be-exported-to knows about copies) to actually generate the \nrevision info.\n\n> What do you think about the other commands I mentioned?\n\nI think they can all go. I think some old scripts migth still use \ngit-rev-tree, but it really is clearly inferior in every way to \ngit-rev-list that such scripts should be fixed anyway. Fixing them should \nbe pretty easy.\n\n(The packed format actually makes git-rev-tree at least ok from a \nperformance angle, even if it has to walk all the way to the root. But I \n_seriously_ doube you want to use it on any big repo anyway, and \ndefinitely not with an unpacked one).\n\n\t\tLinus\n"},{"id":"8749","messageId":"7vfys4e003.fsf@assigned-by-dhcp.cox.net","threadId":"1837","inReplyTo":"Pine.LNX.4.58.0509161938580.26803@g5.osdl.org","subject":"Re: deprecating more","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-09-17T05:28:28Z","receivedAt":"2005-09-17T05:28:28Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n> On Fri, 16 Sep 2005, Junio C Hamano wrote:\n>\n>> What do you think about the other commands I mentioned?\n>\n> I think they can all go. I think some old scripts migth still use \n> git-rev-tree, but it really is clearly inferior in every way to \n> git-rev-list that such scripts should be fixed anyway. Fixing them should \n> be pretty easy.\n\nI found one in our source.  Tony, is the following change\nacceptable to you?\n\n------------\n[PATCH] Use git-rev-list not git-rev-tree where appropriate.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\ndiff --git a/Documentation/howto/using-topic-branches.txt b/Documentation/howto/using-topic-branches.txt\n--- a/Documentation/howto/using-topic-branches.txt\n+++ b/Documentation/howto/using-topic-branches.txt\n@@ -245,7 +245,7 @@ gb=$(tput setab 2)\n rb=$(tput setab 1)\n restore=$(tput setab 9)\n \n-if [ `git-rev-tree release ^test | wc -c` -gt 0 ]\n+if [ `git-rev-list release ^test | wc -c` -gt 0 ]\n then\n \techo $rb Warning: commits in release that are not in test $restore\n \tgit-whatchanged release ^test\n@@ -262,7 +262,7 @@ do\n \tstatus=\n \tfor ref in test release linus\n \tdo\n-\t\tif [ `git-rev-tree $branch ^$ref | wc -c` -gt 0 ]\n+\t\tif [ `git-rev-list $branch ^$ref | wc -c` -gt 0 ]\n \t\tthen\n \t\t\tstatus=$status${ref:0:1}\n \t\tfi\n"},{"id":"8751","messageId":"12c511ca05091623135ccbcae1@mail.gmail.com","threadId":"1837","inReplyTo":"7vfys4e003.fsf@assigned-by-dhcp.cox.net","subject":"Re: deprecating more","fromName":"Tony Luck","fromEmail":"tony.luck@gmail.com","sentAt":"2005-09-17T06:13:09Z","receivedAt":"2005-09-17T06:13:09Z","isPatch":false,"sender":{"key":"tony.luck@gmail.com","avatar":null},"body":"> I found one in our source.  Tony, is the following change\n> acceptable to you?\n> \n> ------------\n> [PATCH] Use git-rev-list not git-rev-tree where appropriate.\n\nSure ... I'll be glad to see git-rev-tree go.  For some reason it got wired\ninto my fingers early on, and I keep typing it when I mean to use\ngit-rev-list, then stare at the screen all confused when it complains\nabout the arguments I gave it.\n\n-Tony\n"}]}