{"thread":{"id":"27998","subject":"[ANNOUNCE/RFC] cj-git-patchtool: a \"rebase -i\" with more interaction","startedAt":"2011-08-02T19:22:26Z","lastAt":"2011-08-04T06:02:10Z","messageCount":3,"participants":["Christian Jaeger","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"172691","messageId":"CAEjYwfUY9tF_9frkaS7Aw26CPJA02Cr3HDN5Qpkup1rfHYacXw@mail.gmail.com","threadId":"27998","inReplyTo":null,"subject":"[ANNOUNCE/RFC] cj-git-patchtool: a \"rebase -i\" with more interaction","fromName":"Christian Jaeger","fromEmail":"chrjae@gmail.com","sentAt":"2011-08-02T19:22:26Z","receivedAt":"2011-08-02T19:22:26Z","isPatch":false,"sender":{"key":"chrjae@gmail.com","avatar":null},"body":"Hi\n\nI've always been a frequent user of git rebase -i to clean up private\nbranches before publication. I like committing without thinking while\ncoding and then grouping the commits sensibly afterwards. But git\nrebase -i didn't scale for me for this purpose, cleaning up several\ndays (or even weeks) of work would become a pain because frequently\nI'd make some error, like when dealing with conflicts, and then\nmultiple rebase -i runs are needed, requiring to partially redo the\nwork.\n\nSo I've written a set of tools[1] that separates the acts of editing\nand applying history changes. It does this by turning the history in\nquestion into a set of git patch files and a file containing the list\nof the patches (and optionally new commit messages), and allows to\nedit both the list and the patch files themselves incrementally until\nthey can be applied cleanly again in the new order. In other words, an\n(attempted) application (cj-git-patchtool's \"app\" command) will not\nremove these files, and if there's a problem the existing files can be\nfurther refined. There's also a command \"wig\" that uses \"wiggle\" (by\nNeil Brown) to try to apply a patch automatically when git or patch\nwouldn't accept it, and if successful, stores the result back into the\npatch file so that it will be reused on subsequent \"app\" runs. For\nconvenience, these files, which are put inside a newly created\ndirectory, are automatically checked into their own git repository,\ntoo, so when doing something really complicated, the state of work can\nbe committed and reverted easily when reaching a dead end.\n\nFor more information see the README on Github.[1]\n\nThis works well for me, I'm now always using it whenever I need to do\nmore than a couple trivial changes to a Git history.\n\nI don't know whether there are other tools offering the same now.\nAlso, I have written this \"just for myself\", and for this reason made\nuse of a set of never-before released Perl libraries of mine. If\nthere's general interest in this tool, I'll be glad to help get rid of\nthe dependency on these libraries (or clean them up and publish them\nproperly, too).\n\nI welcome your comments.\n\nChristian.\n\n[1] https://github.com/pflanze/cj-git-patchtool\n"},{"id":"172745","messageId":"m3d3gmrchz.fsf@localhost.localdomain","threadId":"27998","inReplyTo":"CAEjYwfUY9tF_9frkaS7Aw26CPJA02Cr3HDN5Qpkup1rfHYacXw@mail.gmail.com","subject":"Re: [ANNOUNCE/RFC] cj-git-patchtool: a \"rebase -i\" with more interaction","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2011-08-03T10:55:21Z","receivedAt":"2011-08-03T10:55:21Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Christian Jaeger <chrjae@gmail.com> writes:\n\n> So I've written a set of tools[1] that separates the acts of editing\n> and applying history changes.\n[...]\n> \n> For more information see the README on Github.[1]\n[...]\n\nI have added cj-git-patchtool to \"Patch-management Interface layers\"\nsection of \"Interfaces, frontends and tools\" page on Git Wiki:\n\n  https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools#cj-git-patchtool\n\nPlease check if it is correct, and improve project description if\nneeded.\n\n> I don't know whether there are other tools offering the same now.\n> Also, I have written this \"just for myself\", and for this reason made\n> use of a set of never-before released Perl libraries of mine. If\n> there's general interest in this tool, I'll be glad to help get rid of\n> the dependency on these libraries (or clean them up and publish them\n> properly, too).\n\nI use one of patch management interfaces for that, namely StGit.  It\noperates on stack of patches, which you can apply and unapply, going\nback and forth and correcting them.\n\n-- \nJakub Narębski\n"},{"id":"172887","messageId":"CAEjYwfVfRyde=hzgPDrWgS2VMHWzk5kccDh3TYZTgQ=YXOyeYw@mail.gmail.com","threadId":"27998","inReplyTo":"m3d3gmrchz.fsf@localhost.localdomain","subject":"Re: [ANNOUNCE/RFC] cj-git-patchtool: a \"rebase -i\" with more interaction","fromName":"Christian Jaeger","fromEmail":"chrjae@gmail.com","sentAt":"2011-08-04T06:02:10Z","receivedAt":"2011-08-04T06:02:10Z","isPatch":false,"sender":{"key":"chrjae@gmail.com","avatar":null},"body":"2011/8/3 Jakub Narebski <jnareb@gmail.com>:\n> I have added cj-git-patchtool to \"Patch-management Interface layers\"\n> section of \"Interfaces, frontends and tools\" page on Git Wiki:\n\nCool, thanks!\n\n> I use one of patch management interfaces for that, namely StGit.  It\n> operates on stack of patches, which you can apply and unapply, going\n> back and forth and correcting them.\n\nI knew StGit existed, but I've never actually tried it. Now I also see\nthat the description of Guilt actually sounds exactly what\ncj-git-patchtool does. (I was expecting that these tools would just\nlet me easily create sets of patches, similar to Darcs, not that\nthey'd actually allow to edit patches to fix conflicts.) I'll have to\ntry them out as soon as I find some time. Thanks for the hint.\n\nChristian.\n"}]}