{"thread":{"id":"8602","subject":"StGIT vs. guilt: What's the difference?","startedAt":"2007-06-14T21:55:54Z","lastAt":"2007-06-17T22:28:15Z","messageCount":9,"participants":["Steven Grimm","Karl Hasselström","Catalin Marinas","Yann Dirson","Josef Sipek"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"45095","messageId":"4671B96A.1080202@midwinter.com","threadId":"8602","inReplyTo":null,"subject":"StGIT vs. guilt: What's the difference?","fromName":"Steven Grimm","fromEmail":"koreth@midwinter.com","sentAt":"2007-06-14T21:55:54Z","receivedAt":"2007-06-14T21:55:54Z","isPatch":false,"sender":{"key":"koreth@midwinter.com","avatar":"https://gravatar.com/avatar/71b4d2e8b62f168bdc9e9205341159e3567003b4f9e2127c617c5fa0a1f5bad2?d=mp&s=160"},"body":"I've asked this on IRC a couple times and nobody seemed to have a good \nanswer, so: These two tools seem like they are solving the same general \nproblem using similar approaches. They are both under active \ndevelopment. In what areas is each of them stronger than the other? Why \nwould one choose to use one of them instead of the other?\n\n-Steve\n"},{"id":"45104","messageId":"20070615030542.GA30110@diana.vm.bytemark.co.uk","threadId":"8602","inReplyTo":"4671B96A.1080202@midwinter.com","subject":"Re: StGIT vs. guilt: What's the difference?","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-06-15T03:05:42Z","receivedAt":"2007-06-15T03:05:42Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2007-06-14 14:55:54 -0700, Steven Grimm wrote:\n\n> I've asked this on IRC a couple times and nobody seemed to have a\n> good answer, so: These two tools seem like they are solving the same\n> general problem using similar approaches. They are both under active\n> development. In what areas is each of them stronger than the other?\n> Why would one choose to use one of them instead of the other?\n\nI have never had a close look at guilt, but from what I remember it\nstores patches as plain old plaintext patches (corrections to this\nstatement welcome). StGIT uses git's object database.\n\nI doubt there's anything that one model can handle that the other\ncannot; the question is whether the two _implementations_ are feature\nequivalent or not. And I can't answer that, since I know too little\nabout guilt.\n\nI'm guessing guilt's creator might be a bit more qualified to answer;\nfrom what I recall, he looked at StGIT, but decided to build his own\ntool because StGIT did not meet his requirements.\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"45139","messageId":"tnx1wgds1pv.fsf@arm.com","threadId":"8602","inReplyTo":"20070615030542.GA30110@diana.vm.bytemark.co.uk","subject":"Re: StGIT vs. guilt: What's the difference?","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@arm.com","sentAt":"2007-06-15T14:59:24Z","receivedAt":"2007-06-15T14:59:24Z","isPatch":false,"sender":{"key":"catalin.marinas@arm.com","avatar":null},"body":"Karl Hasselström <kha@treskal.com> wrote:\n> On 2007-06-14 14:55:54 -0700, Steven Grimm wrote:\n>\n>> I've asked this on IRC a couple times and nobody seemed to have a\n>> good answer, so: These two tools seem like they are solving the same\n>> general problem using similar approaches. They are both under active\n>> development. In what areas is each of them stronger than the other?\n>> Why would one choose to use one of them instead of the other?\n>\n> I have never had a close look at guilt, but from what I remember it\n> stores patches as plain old plaintext patches (corrections to this\n> statement welcome). StGIT uses git's object database.\n\nI haven't tried quilt either but, if it uses plain text patches, the\ndisadvantage might be the losing of the three-way merge when pushing a\npatch onto the stack. The solution is to remember which commit the\npatch applies to, switch the tree, apply the patch and merge with\nHEAD.\n\nAre the guilt patches accessible as commit objects at the top of the\nstack?\n\nStGIT might have some more features as it is older but I see a lot of\ndevelopment is going on with guilt. Another difference is that StGIT\nis written in Python and guilt uses shell scripts (some people don't\nlike the dependency on Python).\n\nI would welcome such a discussion (so please keep me cc'ed) as we can\nshare the experience with various issues.\n\n-- \nCatalin\n"},{"id":"45147","messageId":"20070615200139.GS6992@nan92-1-81-57-214-146.fbx.proxad.net","threadId":"8602","inReplyTo":"tnx1wgds1pv.fsf@arm.com","subject":"Re: StGIT vs. guilt: What's the difference?","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-06-15T20:01:39Z","receivedAt":"2007-06-15T20:01:39Z","isPatch":false,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"On Fri, Jun 15, 2007 at 03:59:24PM +0100, Catalin Marinas wrote:\n> I haven't tried quilt either but, if it uses plain text patches, the\n> disadvantage might be the losing of the three-way merge when pushing a\n> patch onto the stack. The solution is to remember which commit the\n> patch applies to, switch the tree, apply the patch and merge with\n> HEAD.\n\nNote that I haven't tried guilt either.\n\nHowever, storing diffs is certainly a great way to interact with\nlegacy SCMs, and there are situations where guilt is certainly more\nsuited than stgit.  Eg, on a project where you have to use CVS, and\nyou have to maintain changes to a Linux kernel, and you want to store\nthe history of a series of patches, guilt will be much easier to use\nthan stgit.\n\nWe may even want to implement something in stgit to ease such\nintegration with legacy SCMs - eg. an option to auto-export the stack\non push/refresh should not be too hard to implement.\n\n\n> StGIT might have some more features as it is older but I see a lot of\n> development is going on with guilt. Another difference is that StGIT\n> is written in Python and guilt uses shell scripts (some people don't\n> like the dependency on Python).\n\nWell, people may not like python, but IMHO it is a lot easier to learn\nit if you don't know it (that's what I did, although I did not start\nfrom zero), than writing a robust and maintainable software of even\nmoderate complexity in shell script.  Shell script may be good for\nprototyping or gluing tools in a simple way, but for advanced sofware\non which to rely to store my own data, it is just not really suited.\n\nBest regards,\n-- \nYann\n"},{"id":"45204","messageId":"20070617035426.GH7025@filer.fsl.cs.sunysb.edu","threadId":"8602","inReplyTo":"tnx1wgds1pv.fsf@arm.com","subject":"Re: StGIT vs. guilt: What's the difference?","fromName":"Josef Sipek","fromEmail":"jsipek@fsl.cs.sunysb.edu","sentAt":"2007-06-17T03:54:27Z","receivedAt":"2007-06-17T03:54:27Z","isPatch":false,"sender":{"key":"jsipek@fsl.cs.sunysb.edu","avatar":null},"body":"On Fri, Jun 15, 2007 at 03:59:24PM +0100, Catalin Marinas wrote:\n> Karl Hasselström <kha@treskal.com> wrote:\n> > On 2007-06-14 14:55:54 -0700, Steven Grimm wrote:\n> >\n> >> I've asked this on IRC a couple times and nobody seemed to have a\n> >> good answer, so: These two tools seem like they are solving the same\n> >> general problem using similar approaches. They are both under active\n> >> development. In what areas is each of them stronger than the other?\n> >> Why would one choose to use one of them instead of the other?\n> >\n> > I have never had a close look at guilt, but from what I remember it\n> > stores patches as plain old plaintext patches (corrections to this\n> > statement welcome). StGIT uses git's object database.\n \nSorry I missed this thread...\n\n> I haven't tried quilt either but, if it uses plain text patches, the\n> disadvantage might be the losing of the three-way merge when pushing a\n> patch onto the stack. The solution is to remember which commit the\n> patch applies to, switch the tree, apply the patch and merge with\n> HEAD.\n \nCatalin: Perhaps a comparison table might be in order? This is most\ndefinitely not the first time this question has been asked.\n\n> Are the guilt patches accessible as commit objects at the top of the\n> stack?\n\nWhen you push a patch, you're doing:\n\t\n\tgit-apply && git-commit\n\nWhen you pop a patch, you're doing:\n\n\tgit-reset --hard HEAD^\n\nSo, once a patch is pushes, it is a separate commit in the git tree, and one\ncan run any valid git command on it.\n\nNow, of course the actual implementation is little bit more complex (e.g.,\nusing git-write-tree and git-commit-tree, as well as allowing to pop several\npatches at the same time).\n\n> StGIT might have some more features as it is older but I see a lot of\n> development is going on with guilt.\n\nI haven't looked at stgit in a number of months, but stgit most likely has\nmany features which make use of the extra metadata stored.\n\nI'm trying to take the simpler approach - most of the time, the user just\nwant to push, refresh, and pop. With that said, there are plenty of useful\ncommands (26 as of now).\n\n> I would welcome such a discussion (so please keep me cc'ed) as we can\n> share the experience with various issues.\n\nSame here.\n\nOne additional thing. About four months ago, I've heard that stgit tends to\nblow up when you switch branches using git-checkout - guilt of course\ndoesn't :) My information may be outdated, so corrections are welcome.\n\nJosef \"Jeff\" Sipek.\n\n-- \nHegh QaQ law'\nquvHa'ghach QaQ puS\n"},{"id":"45205","messageId":"20070617035923.GI7025@filer.fsl.cs.sunysb.edu","threadId":"8602","inReplyTo":"20070615200139.GS6992@nan92-1-81-57-214-146.fbx.proxad.net","subject":"Re: StGIT vs. guilt: What's the difference?","fromName":"Josef Sipek","fromEmail":"jsipek@fsl.cs.sunysb.edu","sentAt":"2007-06-17T03:59:23Z","receivedAt":"2007-06-17T03:59:23Z","isPatch":false,"sender":{"key":"jsipek@fsl.cs.sunysb.edu","avatar":null},"body":"On Fri, Jun 15, 2007 at 10:01:39PM +0200, Yann Dirson wrote:\n> On Fri, Jun 15, 2007 at 03:59:24PM +0100, Catalin Marinas wrote:\n...\n> However, storing diffs is certainly a great way to interact with\n> legacy SCMs, and there are situations where guilt is certainly more\n> suited than stgit.  Eg, on a project where you have to use CVS, and\n> you have to maintain changes to a Linux kernel, and you want to store\n> the history of a series of patches, guilt will be much easier to use\n> than stgit.\n\nThen there is the psychological effect. If I have a directory full of\npatch(1) compatible diff files, I can forget about guilt and just use the\ndiff files directly. With stgit's way of storing the patches, I'd assume\nthings can get a bit harder if you just want to give up on stgit.\n\nBtw, does git-prune & friends do the right thing and not destroy the\npatch-related objects?\n\n...\n> Well, people may not like python, but IMHO it is a lot easier to learn\n> it if you don't know it (that's what I did, although I did not start\n> from zero), than writing a robust and maintainable software of even\n> moderate complexity in shell script.  Shell script may be good for\n> prototyping or gluing tools in a simple way, but for advanced sofware\n> on which to rely to store my own data, it is just not really suited.\n\nSo, why do you use git? ;)\n\nJosef \"Jeff\" Sipek.\n\n-- \nThe box said \"Windows XP or better required\". So I installed Linux.\n"},{"id":"45213","messageId":"b0943d9e0706170146l75754d02n8844bffb38b8d846@mail.gmail.com","threadId":"8602","inReplyTo":"20070617035426.GH7025@filer.fsl.cs.sunysb.edu","subject":"Re: StGIT vs. guilt: What's the difference?","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2007-06-17T08:46:53Z","receivedAt":"2007-06-17T08:46:53Z","isPatch":false,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 17/06/07, Josef Sipek <jsipek@fsl.cs.sunysb.edu> wrote:\n> On Fri, Jun 15, 2007 at 03:59:24PM +0100, Catalin Marinas wrote:\n> > I haven't tried quilt either but, if it uses plain text patches, the\n> > disadvantage might be the losing of the three-way merge when pushing a\n> > patch onto the stack. The solution is to remember which commit the\n> > patch applies to, switch the tree, apply the patch and merge with\n> > HEAD.\n>\n> Catalin: Perhaps a comparison table might be in order? This is most\n> definitely not the first time this question has been asked.\n\nYes, a table on a wiki (maybe a neutral one like git.or.cz?) would be\ngood as it is easier to keep up to date.\n\n> > Are the guilt patches accessible as commit objects at the top of the\n> > stack?\n>\n> When you push a patch, you're doing:\n>\n>        git-apply && git-commit\n\nStGIT's behaviour is more like:\n\n  (git-apply || git-recursive-merge) && git-commit\n\ni.e. if simple git-apply fails, it tries a proper three-way merge and\ncan automatically invoke a graphical merge tool (xxdiff, emacs etc.).\n\nThe input to git-apply is generated by git-diff with the top and\nbottom commit ids of the patch as arguments. People mentioned that\nwould be good to keep the plain diff and just apply it but we might\nstill need to generate the patch after a push and hence call git-diff.\nIt might work if we only regenerate the patch when git-apply fails and\nwe run a recursive merge. Actually StGIT notifies you when the 'push'\nresulted in a modified patch so that one can re-export it.\n\nAome other features of 'push' is automatic detection of patches merged\nupstream (either by trying a reverse-apply or an empty patch resulting\nfrom a three-way merge). It can also do fast-forwarding if the base\ntree hasn't changed.\n\n> When you pop a patch, you're doing:\n>\n>        git-reset --hard HEAD^\n\nStGIT uses git-read-tree as it is safer with unresolved conflicts and\nlocal changes.\n\n> > StGIT might have some more features as it is older but I see a lot of\n> > development is going on with guilt.\n>\n> I haven't looked at stgit in a number of months, but stgit most likely has\n> many features which make use of the extra metadata stored.\n\nMost of the metada could actually be generated from the commit object.\nWe just store it for performance. However, with some recent DAG\npatches from Karl, we plan to get this information directly from the\nrepository.\n\n> I'm trying to take the simpler approach - most of the time, the user just\n> want to push, refresh, and pop. With that said, there are plenty of useful\n> commands (26 as of now).\n\nStGIT started with these too but it grew to 41.\n\n> One additional thing. About four months ago, I've heard that stgit tends to\n> blow up when you switch branches using git-checkout - guilt of course\n> doesn't :) My information may be outdated, so corrections are welcome.\n\nNot sure what you mean but it is safe to use git-checkout to switch\nbranches and use them with StGIT afterwards, assuming they were\ninitialised for StGIT (though StGIT has its own command for managing\nbranches).\n\nSome other useful commands in StGIT are 'mail' (to SMTP or mbox),\n'export' (to quilt series), 'import' (from various sources like quilt\nseries, e-mail message, mbox). It also support templates for the mail\nand export commands and various configuration options (shares the\n.git/config file and adds a [stgit] section).\n\n-- \nCatalin\n"},{"id":"45214","messageId":"b0943d9e0706170154v75603612qe85bbc4d8f2b2049@mail.gmail.com","threadId":"8602","inReplyTo":"20070617035923.GI7025@filer.fsl.cs.sunysb.edu","subject":"Re: StGIT vs. guilt: What's the difference?","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2007-06-17T08:54:35Z","receivedAt":"2007-06-17T08:54:35Z","isPatch":false,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 17/06/07, Josef Sipek <jsipek@fsl.cs.sunysb.edu> wrote:\n> Then there is the psychological effect. If I have a directory full of\n> patch(1) compatible diff files, I can forget about guilt and just use the\n> diff files directly. With stgit's way of storing the patches, I'd assume\n> things can get a bit harder if you just want to give up on stgit.\n\nI do this a lot to refine patches but I export the patch and re-import\nit (I can even merge it with the old version using 'stg fold\n--threeway' and it will prompt me for the differences via xxdiff or\nemacs).\n\n> Btw, does git-prune & friends do the right thing and not destroy the\n> patch-related objects?\n\nStGIT patches are git-prune safe. The commit ids are stored in\n.git/refs/patches.\n\n> > Well, people may not like python, but IMHO it is a lot easier to learn\n> > it if you don't know it (that's what I did, although I did not start\n> > from zero), than writing a robust and maintainable software of even\n> > moderate complexity in shell script.  Shell script may be good for\n> > prototyping or gluing tools in a simple way, but for advanced sofware\n> > on which to rely to store my own data, it is just not really suited.\n>\n> So, why do you use git? ;)\n\nWell, I guess he's mostly using StGIT which uses only the built-in GIT\ncommands written in C :-).\n\n-- \nCatalin\n"},{"id":"45248","messageId":"20070617222815.GA4324@nan92-1-81-57-214-146.fbx.proxad.net","threadId":"8602","inReplyTo":"20070617035923.GI7025@filer.fsl.cs.sunysb.edu","subject":"Re: StGIT vs. guilt: What's the difference?","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-06-17T22:28:15Z","receivedAt":"2007-06-17T22:28:15Z","isPatch":false,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"On Sat, Jun 16, 2007 at 11:59:23PM -0400, Josef Sipek wrote:\n> > Well, people may not like python, but IMHO it is a lot easier to learn\n> > it if you don't know it (that's what I did, although I did not start\n> > from zero), than writing a robust and maintainable software of even\n> > moderate complexity in shell script.  Shell script may be good for\n> > prototyping or gluing tools in a simple way, but for advanced sofware\n> > on which to rely to store my own data, it is just not really suited.\n> \n> So, why do you use git? ;)\n\nThere is no such problem in git, since only some porcelain commands are\nstill written in shell - and anyway C rewrites are quite fashionable those\ndays ;)\n\nBest regards,\n-- \nYann.\n"}]}