{"thread":{"id":"9622","subject":"stgit 0.13 import mbox problems","startedAt":"2007-08-23T09:22:54Z","lastAt":"2007-08-23T20:57:42Z","messageCount":14,"participants":["Greg KH","Catalin Marinas","Josef Sipek","J. Bruce Fields"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"51354","messageId":"20070823092254.GA5976@kroah.com","threadId":"9622","inReplyTo":null,"subject":"stgit 0.13 import mbox problems","fromName":"Greg KH","fromEmail":"greg@kroah.com","sentAt":"2007-08-23T09:22:54Z","receivedAt":"2007-08-23T09:22:54Z","isPatch":false,"sender":{"key":"greg@kroah.com","avatar":"https://gravatar.com/avatar/5bb5aa0cc2e01c00ec899d11130c07796bc186e465bae57bc34873b13b72c7c8?d=mp&s=160"},"body":"Hi,\n\nI wanted to see if I could start using stgit instead of quilt, so I\ntried to import my current set of kernel patches.\n\nAfter giving up on the \"import a series\" option, I just created a mbox\nof all of them using quilt and tried to import that.  Unfortunately that\ndidn't work either:\n\t$ stg import -M ~/linux/patches/mbox\n\tChecking for changes in the working directory ... done\n\tImporting patch \"add-my-version-to-the-kernel\" ... done\n\tImporting patch \"stupid-patch-for-my-laptop-whi\" ... done\n\tImporting patch \"gregs-test-driver-core-sysfs-s\" ... done\n\tImporting patch \"detect-atomic-counter-underflo\" ... done\n\tWarning: Message does not contain any diff\n\tstg import: No diff found inside the patch\n\nI'm using the .13 version if that matters.\n\nThe mbox contains 177 kernel patches against Linus's current tree\n(2.6.23-rc3-git5), and is available at:\n\thttp://www.kernel.org/pub/linux/kernel/people/gregkh/misc/gregkh-stgit-import-mbox.gz\nif anyone wants to test it out and see what I was doing wrong.\n\nAny hints?\n\nOh, I do have some suggestions as to the naming of the patch from a mail\nfile, as limiting this to a small number of characters like stgit\ncurrently does will not work out for a lot of my patches, but I'll wait\nuntil I can actually import the thing before I look into that :)\n\nthanks,\n\ngreg k-h\n"},{"id":"51359","messageId":"b0943d9e0708230319m3242f4a7yb4db1505f0d2e3@mail.gmail.com","threadId":"9622","inReplyTo":"20070823092254.GA5976@kroah.com","subject":"Re: stgit 0.13 import mbox problems","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2007-08-23T10:19:12Z","receivedAt":"2007-08-23T10:19:12Z","isPatch":false,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 23/08/07, Greg KH <greg@kroah.com> wrote:\n> I wanted to see if I could start using stgit instead of quilt, so I\n> tried to import my current set of kernel patches.\n>\n> After giving up on the \"import a series\" option,\n\nWhy?\n\n> I just created a mbox\n> of all of them using quilt and tried to import that.  Unfortunately that\n> didn't work either:\n>         $ stg import -M ~/linux/patches/mbox\n>         Checking for changes in the working directory ... done\n>         Importing patch \"add-my-version-to-the-kernel\" ... done\n>         Importing patch \"stupid-patch-for-my-laptop-whi\" ... done\n>         Importing patch \"gregs-test-driver-core-sysfs-s\" ... done\n>         Importing patch \"detect-atomic-counter-underflo\" ... done\n>         Warning: Message does not contain any diff\n>         stg import: No diff found inside the patch\n\nMaybe I should just leave the warning and let it continue. The reason\nI added it was that \"git-apply --index\" fails if there is no diff.\n\nIn the meantime, you can try the attached patch for StGIT.\n\nAnother hint - quilt can apply patches with fuzz but GIT doesn't allow\nthis by default. If a patch fails, the diff is dumped to the\n.stgit-failed.patch file so that you can apply it manually (with patch\nor git-apply) and run 'stg refresh' afterwards.\n\nAfter an import failure, you can continue importing from the next\npatch using the 'stg import --ignore' option.\n\n> I'm using the .13 version if that matters.\n>\n> The mbox contains 177 kernel patches against Linus's current tree\n> (2.6.23-rc3-git5), and is available at:\n>         http://www.kernel.org/pub/linux/kernel/people/gregkh/misc/gregkh-stgit-import-mbox.gz\n> if anyone wants to test it out and see what I was doing wrong.\n\nI'll give it a try.\n\nOne thing you'll notice is the speed difference as stgit has to\ngenerate a git commit during a push operation.\n\n> Oh, I do have some suggestions as to the naming of the patch from a mail\n> file, as limiting this to a small number of characters like stgit\n> currently does will not work out for a lot of my patches, but I'll wait\n> until I can actually import the thing before I look into that :)\n\nWe had the full name in the past but the algorithm cause problems with\npatches (not e-mails) that didn't have a subject line. It's probably\nbetter to have a config option rather than hard-coded 30 characters.\nNote that 'stg series -d' will display the full subject line.\n\nIf you don't give up before importing the files :-), please let us\nknow the user experience, especially related to speed as compared to\nquilt.\n\nKarl, maybe it's worth trying this series with your DAG patches as well.\n\nRegards.\n\n-- \nCatalin\n\n\nAllow 'import' to apply empty patches\n\nFrom: Catalin Marinas <catalin.marinas@gmail.com>\n\nSigned-off-by: Catalin Marinas <catalin.marinas@gmail.com>\n---\n\n stgit/commands/imprt.py |   22 ++++++++++------------\n 1 files changed, 10 insertions(+), 12 deletions(-)\n\ndiff --git a/stgit/commands/imprt.py b/stgit/commands/imprt.py\nindex f972b89..98fe708 100644\n--- a/stgit/commands/imprt.py\n+++ b/stgit/commands/imprt.py\n@@ -201,8 +201,6 @@ def __parse_mail(msg):\n     rem_descr, diff = __split_descr_diff(msg_text)\n     if rem_descr:\n         descr += '\\n\\n' + rem_descr\n-    if not diff:\n-        out.warn('Message does not contain any diff')\n \n     # parse the description for author information\n     descr, descr_authname, descr_authemail, descr_authdate = \\\n@@ -250,9 +248,6 @@ def __create_patch(filename, message, author_name, author_email,\n         # fix possible invalid characters in the patch name\n         patch = re.sub('[^\\w.]+', '-', patch).strip('-')\n \n-    if not diff:\n-        raise CmdException, 'No diff found inside the patch'\n-\n     if options.ignore and patch in crt_series.get_applied():\n         out.info('Ignoring already applied patch \"%s\"' % patch)\n         return\n@@ -288,14 +283,17 @@ def __create_patch(filename, message, author_name, author_email,\n                          committer_name = committer_name,\n                          committer_email = committer_email)\n \n-    out.start('Importing patch \"%s\"' % patch)\n-    if options.base:\n-        git.apply_patch(diff = diff, base = git_id(options.base))\n+    if not diff:\n+        out.warn('No diff found, creating empty patch')\n     else:\n-        git.apply_patch(diff = diff)\n-    crt_series.refresh_patch(edit = options.edit,\n-                             show_patch = options.showpatch)\n-    out.done()\n+        out.start('Importing patch \"%s\"' % patch)\n+        if options.base:\n+            git.apply_patch(diff = diff, base = git_id(options.base))\n+        else:\n+            git.apply_patch(diff = diff)\n+        crt_series.refresh_patch(edit = options.edit,\n+                                 show_patch = options.showpatch)\n+        out.done()\n \n def __import_file(filename, options, patch = None):\n     \"\"\"Import a patch from a file or standard input\n"},{"id":"51361","messageId":"b0943d9e0708230327p12a39ac0xbe4e3b32bd3b5f53@mail.gmail.com","threadId":"9622","inReplyTo":"b0943d9e0708230319m3242f4a7yb4db1505f0d2e3@mail.gmail.com","subject":"Re: stgit 0.13 import mbox problems","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2007-08-23T10:27:10Z","receivedAt":"2007-08-23T10:27:10Z","isPatch":false,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 23/08/07, Catalin Marinas <catalin.marinas@gmail.com> wrote:\n> One thing you'll notice is the speed difference as stgit has to\n> generate a git commit during a push operation.\n\nI did some performance comparison with Quilt almost two years ago but\nI think both StGIT and GIT were greatly improved since then:\n\nhttp://www.gelato.unsw.edu.au/archives/git/0510/10059.html\n\n-- \nCatalin\n"},{"id":"51378","messageId":"20070823164322.GC5528@kroah.com","threadId":"9622","inReplyTo":"b0943d9e0708230319m3242f4a7yb4db1505f0d2e3@mail.gmail.com","subject":"Re: stgit 0.13 import mbox problems","fromName":"Greg KH","fromEmail":"greg@kroah.com","sentAt":"2007-08-23T16:43:22Z","receivedAt":"2007-08-23T16:43:22Z","isPatch":false,"sender":{"key":"greg@kroah.com","avatar":"https://gravatar.com/avatar/5bb5aa0cc2e01c00ec899d11130c07796bc186e465bae57bc34873b13b72c7c8?d=mp&s=160"},"body":"On Thu, Aug 23, 2007 at 11:19:12AM +0100, Catalin Marinas wrote:\n> On 23/08/07, Greg KH <greg@kroah.com> wrote:\n> > I wanted to see if I could start using stgit instead of quilt, so I\n> > tried to import my current set of kernel patches.\n> >\n> > After giving up on the \"import a series\" option,\n> \n> Why?\n\nBecause it kept dieing too :)\n\nAlso, it would import these patches, which are individually in mbox\nform, with the incorrect author information.  So I thought I would use\nthe mbox form to make sure I wasn't just doing something stupid.\n\n> > I just created a mbox\n> > of all of them using quilt and tried to import that.  Unfortunately that\n> > didn't work either:\n> >         $ stg import -M ~/linux/patches/mbox\n> >         Checking for changes in the working directory ... done\n> >         Importing patch \"add-my-version-to-the-kernel\" ... done\n> >         Importing patch \"stupid-patch-for-my-laptop-whi\" ... done\n> >         Importing patch \"gregs-test-driver-core-sysfs-s\" ... done\n> >         Importing patch \"detect-atomic-counter-underflo\" ... done\n> >         Warning: Message does not contain any diff\n> >         stg import: No diff found inside the patch\n> \n> Maybe I should just leave the warning and let it continue. The reason\n> I added it was that \"git-apply --index\" fails if there is no diff.\n\nBut there was a diff.  Or it was in the file, I don't know what happened\nto it :)\n\n> In the meantime, you can try the attached patch for StGIT.\n> \n> Another hint - quilt can apply patches with fuzz but GIT doesn't allow\n> this by default. If a patch fails, the diff is dumped to the\n> .stgit-failed.patch file so that you can apply it manually (with patch\n> or git-apply) and run 'stg refresh' afterwards.\n\nAh, perhaps this is the problem, I'll check it out later today.  A bit\nmore helpful message would be appreciated, especially as I get a lot of\npatches that at first apply, do not go cleanly at all.  I think there's\nan override option for git to ignore fuzz somewhere, right?  Perhaps\nthat could be an option for stgit here?\n\n> After an import failure, you can continue importing from the next\n> patch using the 'stg import --ignore' option.\n\nOk, will try that, and your patch.\n\n> > I'm using the .13 version if that matters.\n> >\n> > The mbox contains 177 kernel patches against Linus's current tree\n> > (2.6.23-rc3-git5), and is available at:\n> >         http://www.kernel.org/pub/linux/kernel/people/gregkh/misc/gregkh-stgit-import-mbox.gz\n> > if anyone wants to test it out and see what I was doing wrong.\n> \n> I'll give it a try.\n> \n> One thing you'll notice is the speed difference as stgit has to\n> generate a git commit during a push operation.\n\nOh yeah, I know that it would be slower, but I use git-quiltapply a lot\nfor sending patches to Linus, and that seems quite fast (actually a lot\nfaster than stgit for some reason...)\n\n> > Oh, I do have some suggestions as to the naming of the patch from a mail\n> > file, as limiting this to a small number of characters like stgit\n> > currently does will not work out for a lot of my patches, but I'll wait\n> > until I can actually import the thing before I look into that :)\n> \n> We had the full name in the past but the algorithm cause problems with\n> patches (not e-mails) that didn't have a subject line. It's probably\n> better to have a config option rather than hard-coded 30 characters.\n> Note that 'stg series -d' will display the full subject line.\n\nHm, that shows:\n\t$ stg series -d\n\t+ add-my-version-to-the-kernel   | Add my version to the kernel.\n\t+ stupid-patch-for-my-laptop-whi | Stupid patch for my laptop which cant get sysrq-u\n\t+ gregs-test-driver-core-sysfs-s | Gregs test driver core / sysfs stress test module\n\t> detect-atomic-counter-underflo | detect atomic counter underflows\n\nAre those spaces really the name of the patch?\n\nWhy not just take the Subject: and mangle it to be the full name of the\npatch (yeah, I can see problems if you don't have the subject).  I have\na bash script around here from a kernel developer that I use to turn\nmbox files into sane file names that works great.\n\nAh, it's at:\n\thttp://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/scripts/rename-patch\nif you want to take a look and possibly use the same type of logic.\nHm, Jean seems to have updated it, use the one at:\n\thttp://jdelvare.pck.nerim.net/linux/rename-patch\ninstead, it's a bit more up to date.\n\n> If you don't give up before importing the files :-), please let us\n> know the user experience, especially related to speed as compared to\n> quilt.\n\nI really don't want to give up :)\n\nI really do like quilt, but wanted to see how well my current workflow\ncould be by using stgit as I'm constantly rebasing the main kernel\nversion against -git snapshots and sometimes that isn't frequent enough.\n\nthanks,\n\ngreg k-h\n"},{"id":"51381","messageId":"20070823180633.GA24530@filer.fsl.cs.sunysb.edu","threadId":"9622","inReplyTo":"20070823092254.GA5976@kroah.com","subject":"Re: stgit 0.13 import mbox problems","fromName":"Josef Sipek","fromEmail":"jsipek@fsl.cs.sunysb.edu","sentAt":"2007-08-23T18:06:33Z","receivedAt":"2007-08-23T18:06:33Z","isPatch":false,"sender":{"key":"jsipek@fsl.cs.sunysb.edu","avatar":null},"body":"On Thu, Aug 23, 2007 at 02:22:54AM -0700, Greg KH wrote:\n> Hi,\n> \n> I wanted to see if I could start using stgit instead of quilt, so I\n> tried to import my current set of kernel patches.\n \nMay I suggest you give guilt [1,2] a spin? It uses the same quilt-like\npatch directory format so things should Just Work(tm).\n\nJosef 'Jeff' Sipek.\n\n[1] http://kernel.org/pub/linux/kernel/people/jsipek/guilt/\n[2] git://git.kernel.org/pub/scm/linux/kernel/git/jsipek/guilt.git\n\n-- \nYou measure democracy by the freedom it gives its dissidents, not the\nfreedom it gives its assimilated conformists.\n\t\t- Abbie Hoffman\n"},{"id":"51382","messageId":"20070823183111.GB15684@fieldses.org","threadId":"9622","inReplyTo":"20070823164322.GC5528@kroah.com","subject":"Re: stgit 0.13 import mbox problems","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2007-08-23T18:31:11Z","receivedAt":"2007-08-23T18:31:11Z","isPatch":false,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Thu, Aug 23, 2007 at 09:43:22AM -0700, Greg KH wrote:\n> I really do like quilt, but wanted to see how well my current workflow\n> could be by using stgit as I'm constantly rebasing the main kernel\n> version against -git snapshots and sometimes that isn't frequent enough.\n\nSo just want to be able to rebase more than once a day?  Then why not\njust run quilt on top of git?  Pop off all your quilt patches, git pull,\npush them all back on again....\n\nMaybe I'm misunderstanding your use case.\n\n--b.\n"},{"id":"51385","messageId":"20070823184201.GA17601@kroah.com","threadId":"9622","inReplyTo":"20070823183111.GB15684@fieldses.org","subject":"Re: stgit 0.13 import mbox problems","fromName":"Greg KH","fromEmail":"greg@kroah.com","sentAt":"2007-08-23T18:42:01Z","receivedAt":"2007-08-23T18:42:01Z","isPatch":false,"sender":{"key":"greg@kroah.com","avatar":"https://gravatar.com/avatar/5bb5aa0cc2e01c00ec899d11130c07796bc186e465bae57bc34873b13b72c7c8?d=mp&s=160"},"body":"On Thu, Aug 23, 2007 at 02:31:11PM -0400, J. Bruce Fields wrote:\n> On Thu, Aug 23, 2007 at 09:43:22AM -0700, Greg KH wrote:\n> > I really do like quilt, but wanted to see how well my current workflow\n> > could be by using stgit as I'm constantly rebasing the main kernel\n> > version against -git snapshots and sometimes that isn't frequent enough.\n> \n> So just want to be able to rebase more than once a day?  Then why not\n> just run quilt on top of git?  Pop off all your quilt patches, git pull,\n> push them all back on again....\n\nYes, I can do that, but I already keep the patch set in a different git\ntree, so that others can sync up with me at times.\n\nI was just thinking that it might be easier to use stgit and then only\nhave to use one git tree to do everything, as this is what stgit is for\n:)\n\nJust always trying to see if I can make my life easier and help out with\nmaking git better overall...\n\nthanks,\n\ngreg k-h\n"},{"id":"51386","messageId":"20070823184758.GB17601@kroah.com","threadId":"9622","inReplyTo":"20070823180633.GA24530@filer.fsl.cs.sunysb.edu","subject":"Re: stgit 0.13 import mbox problems","fromName":"Greg KH","fromEmail":"greg@kroah.com","sentAt":"2007-08-23T18:47:58Z","receivedAt":"2007-08-23T18:47:58Z","isPatch":false,"sender":{"key":"greg@kroah.com","avatar":"https://gravatar.com/avatar/5bb5aa0cc2e01c00ec899d11130c07796bc186e465bae57bc34873b13b72c7c8?d=mp&s=160"},"body":"On Thu, Aug 23, 2007 at 02:06:33PM -0400, Josef Sipek wrote:\n> On Thu, Aug 23, 2007 at 02:22:54AM -0700, Greg KH wrote:\n> > Hi,\n> > \n> > I wanted to see if I could start using stgit instead of quilt, so I\n> > tried to import my current set of kernel patches.\n>  \n> May I suggest you give guilt [1,2] a spin? It uses the same quilt-like\n> patch directory format so things should Just Work(tm).\n\nNice, I didn't realize this was still being worked on.\n\nHm, is there an \"easy\" way to take a current tree of quilt patches\n(like, say 177 of them) and import them into guilt?  After reading the\nguilt documentation I didn't see a way to do it, but I might have missed\nsomething.\n\nAlso, this looks exactly like stgit in a way, can anyone point me at the\ndifferences, or is this just two different projects being done by two\ndifferent groups/people to do the same thing?  If so, that's fine, just\ncurious.\n\nthanks,\n\ngreg k-h\n"},{"id":"51387","messageId":"20070823185608.GC1608@filer.fsl.cs.sunysb.edu","threadId":"9622","inReplyTo":"20070823184758.GB17601@kroah.com","subject":"Re: stgit 0.13 import mbox problems","fromName":"Josef Sipek","fromEmail":"jsipek@fsl.cs.sunysb.edu","sentAt":"2007-08-23T18:56:08Z","receivedAt":"2007-08-23T18:56:08Z","isPatch":false,"sender":{"key":"jsipek@fsl.cs.sunysb.edu","avatar":null},"body":"On Thu, Aug 23, 2007 at 11:47:58AM -0700, Greg KH wrote:\n> On Thu, Aug 23, 2007 at 02:06:33PM -0400, Josef Sipek wrote:\n> > On Thu, Aug 23, 2007 at 02:22:54AM -0700, Greg KH wrote:\n> > > Hi,\n> > > \n> > > I wanted to see if I could start using stgit instead of quilt, so I\n> > > tried to import my current set of kernel patches.\n> >  \n> > May I suggest you give guilt [1,2] a spin? It uses the same quilt-like\n> > patch directory format so things should Just Work(tm).\n> \n> Nice, I didn't realize this was still being worked on.\n> \n> Hm, is there an \"easy\" way to take a current tree of quilt patches\n> (like, say 177 of them) and import them into guilt?  After reading the\n> guilt documentation I didn't see a way to do it, but I might have missed\n> something.\n \ncd gregkh-2.6/\ngit-checkout master\nguilt-init\nrm -rf .git/patches/master/\nmv quilts-patches-dir/ .git/patches/master/\nguilt-series # tada!\n\n> Also, this looks exactly like stgit in a way, can anyone point me at the\n> differences, or is this just two different projects being done by two\n> different groups/people to do the same thing?  If so, that's fine, just\n> curious.\n\nYep. Two different projects taking different approaches to storing the\npatches. I go with the plaintext diff approach ala quilt, while stgit uses\ngit objects to store the data.\n\nJosef 'Jeff' Sipek.\n \n-- \n#endif /* NO LIFE */\n"},{"id":"51389","messageId":"20070823192333.GA7269@filer.fsl.cs.sunysb.edu","threadId":"9622","inReplyTo":"20070823184758.GB17601@kroah.com","subject":"Re: stgit 0.13 import mbox problems","fromName":"Josef Sipek","fromEmail":"jsipek@fsl.cs.sunysb.edu","sentAt":"2007-08-23T19:23:33Z","receivedAt":"2007-08-23T19:23:33Z","isPatch":false,"sender":{"key":"jsipek@fsl.cs.sunysb.edu","avatar":null},"body":"On Thu, Aug 23, 2007 at 11:47:58AM -0700, Greg KH wrote:\n> On Thu, Aug 23, 2007 at 02:06:33PM -0400, Josef Sipek wrote:\n> > On Thu, Aug 23, 2007 at 02:22:54AM -0700, Greg KH wrote:\n> > > Hi,\n> > > \n> > > I wanted to see if I could start using stgit instead of quilt, so I\n> > > tried to import my current set of kernel patches.\n> >  \n> > May I suggest you give guilt [1,2] a spin? It uses the same quilt-like\n> > patch directory format so things should Just Work(tm).\n> \n> Nice, I didn't realize this was still being worked on.\n \nHeh, I just noticed this...guilt is younger than stgit - and was created\nbecause of how stgit stores the patches. :)\n\nJosef 'Jeff' Sipek.\n\n-- \nIf I have trouble installing Linux, something is wrong. Very wrong.\n\t\t- Linus Torvalds\n"},{"id":"51398","messageId":"b0943d9e0708231336h3a92de22oc025c69b9209da9a@mail.gmail.com","threadId":"9622","inReplyTo":"20070823185608.GC1608@filer.fsl.cs.sunysb.edu","subject":"Re: stgit 0.13 import mbox problems","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2007-08-23T20:36:05Z","receivedAt":"2007-08-23T20:36:05Z","isPatch":false,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 23/08/07, Josef Sipek <jsipek@fsl.cs.sunysb.edu> wrote:\n> Yep. Two different projects taking different approaches to storing the\n> patches. I go with the plaintext diff approach ala quilt, while stgit uses\n> git objects to store the data.\n\nBut guilt also generates a commit object when pushing a patch. Or am I wrong?\n\n-- \nCatalin\n"},{"id":"51400","messageId":"20070823204202.GA10644@filer.fsl.cs.sunysb.edu","threadId":"9622","inReplyTo":"b0943d9e0708231336h3a92de22oc025c69b9209da9a@mail.gmail.com","subject":"Re: stgit 0.13 import mbox problems","fromName":"Josef Sipek","fromEmail":"jsipek@fsl.cs.sunysb.edu","sentAt":"2007-08-23T20:42:02Z","receivedAt":"2007-08-23T20:42:02Z","isPatch":false,"sender":{"key":"jsipek@fsl.cs.sunysb.edu","avatar":null},"body":"On Thu, Aug 23, 2007 at 09:36:05PM +0100, Catalin Marinas wrote:\n> On 23/08/07, Josef Sipek <jsipek@fsl.cs.sunysb.edu> wrote:\n> > Yep. Two different projects taking different approaches to storing the\n> > patches. I go with the plaintext diff approach ala quilt, while stgit uses\n> > git objects to store the data.\n> \n> But guilt also generates a commit object when pushing a patch. Or am I wrong?\n\nThat's correct. But the git commit/tree/blob objects are a mere cache. For\nexample, a refresh consists of:\n\ngit-update-index ...\ngit-diff HEAD^ > patchfile\ngit-reset --hard HEAD^\n<internal push patch function - uses git-apply, git-{write,commit}-tree>\n\nJosef 'Jeff' Sipek.\n\n-- \nResearch, n.:\n  Consider Columbus:\n    He didn't know where he was going.\n    When he got there he didn't know where he was.\n    When he got back he didn't know where he had been.\n    And he did it all on someone else's money.\n"},{"id":"51401","messageId":"b0943d9e0708231348o28d870fem656330f89f248578@mail.gmail.com","threadId":"9622","inReplyTo":"20070823204202.GA10644@filer.fsl.cs.sunysb.edu","subject":"Re: stgit 0.13 import mbox problems","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2007-08-23T20:48:09Z","receivedAt":"2007-08-23T20:48:09Z","isPatch":false,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 23/08/07, Josef Sipek <jsipek@fsl.cs.sunysb.edu> wrote:\n> On Thu, Aug 23, 2007 at 09:36:05PM +0100, Catalin Marinas wrote:\n> > On 23/08/07, Josef Sipek <jsipek@fsl.cs.sunysb.edu> wrote:\n> > > Yep. Two different projects taking different approaches to storing the\n> > > patches. I go with the plaintext diff approach ala quilt, while stgit uses\n> > > git objects to store the data.\n> >\n> > But guilt also generates a commit object when pushing a patch. Or am I wrong?\n>\n> That's correct. But the git commit/tree/blob objects are a mere cache. For\n> example, a refresh consists of:\n>\n> git-update-index ...\n> git-diff HEAD^ > patchfile\n> git-reset --hard HEAD^\n> <internal push patch function - uses git-apply, git-{write,commit}-tree>\n\nStGIT does a \"git-diff | git-apply\" during push as an optimisation.\nGuilt moved the diff to the 'refresh' command. It might be a good idea\nas the delay during 'push' is much more visible.\n\nAs I said in the past, the difference I see is that StGIT performs\nthree-way merging if simple git-apply fails, with the possibility\n(configurable) of automatically starting a three-way merge tool like\nxxdiff or emacs. Guilt could probably be modified but this information\nneeded for the three-way merge might be lost with text-only patches.\n\nThe rest is some extra functionality, StGIT being around for longer\n(actually I think two months younger than the first official GIT\nannouncement).\n\n-- \nCatalin\n"},{"id":"51403","messageId":"b0943d9e0708231357s1ceaa121qd56e3a9c71677c8d@mail.gmail.com","threadId":"9622","inReplyTo":"20070823164322.GC5528@kroah.com","subject":"Re: stgit 0.13 import mbox problems","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2007-08-23T20:57:42Z","receivedAt":"2007-08-23T20:57:42Z","isPatch":false,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 23/08/07, Greg KH <greg@kroah.com> wrote:\n> Also, it would import these patches, which are individually in mbox\n> form, with the incorrect author information.  So I thought I would use\n> the mbox form to make sure I wasn't just doing something stupid.\n\nIf the patches have a \"From: ...\" line after the subject (as described\nin the submitting patches kernel docs), StGIT honours it.\n\nYet another way (might be even simpler for you) - use git-applymbox\n(or git-quiltapply) and 'stg uncommit -n 177'. The former generates\nGIT commits and the latter creates StGIT patches (without touching the\ntree, HEAD remains the same and corresponds to the top patch). There\nis also 'stg uncommit --to=commit-id'.\n\n> > After an import failure, you can continue importing from the next\n> > patch using the 'stg import --ignore' option.\n>\n> Ok, will try that, and your patch.\n\nYou can try the tonight snapshot which has this patch included (and\nother fixes) - http://homepage.ntlworld.com/cmarinas/stgit/snapshots/stgit-20070823.tar.gz\n\n> > One thing you'll notice is the speed difference as stgit has to\n> > generate a git commit during a push operation.\n>\n> Oh yeah, I know that it would be slower, but I use git-quiltapply a lot\n> for sending patches to Linus, and that seems quite fast (actually a lot\n> faster than stgit for some reason...)\n\nI should have a look at what git-quiltapply does as most of the StGIT\nwaiting time on external GIT invocation.\n\n>         $ stg series -d\n>         + add-my-version-to-the-kernel   | Add my version to the kernel.\n>         + stupid-patch-for-my-laptop-whi | Stupid patch for my laptop which cant get sysrq-u\n>         + gregs-test-driver-core-sysfs-s | Gregs test driver core / sysfs stress test module\n>         > detect-atomic-counter-underflo | detect atomic counter underflows\n>\n> Are those spaces really the name of the patch?\n\nNo, the patch name is with the dashes, the rest is the patch subject line.\n\n-- \nCatalin\n"}]}