On Sun, Aug 05, 2007 at 03:15:29PM +0100, Johannes Schindelin wrote: > Hi, > > On Sun, 5 Aug 2007, Josef Sipek wrote: > > > On Sun, Aug 05, 2007 at 02:56:23PM +0100, Johannes Schindelin wrote: > > > > > > On Sun, 5 Aug 2007, Josef Sipek wrote: > > > > > > > Sure, if you can take 2 commits and collapse them into one you could > > > > fake it by creating a dummy commit with the new changes, and then > > > > collapsing, but that's nasty - and reflog might not like that much > > > > :) > > > > > > IIUC you want to edit/amend a patch in the middle of a series? Two ways > > > to go about it: > > > > > > 1) (preferred) > > > > > > * start rebase -i > > > * mark the commit as "edit" > > > * wait until rebase stops to let you edit it > > > * edit, test, commit --amend > > > * rebase --continue > > > > Ewww...that doesn't seem to scale (read: far too much to type) :) Here's a > > quilt/guilt/stgit equivalent: > > > > $APP push <patchname> > > > > or (depending on where you are in the patch stack) > > > > $APP pop <patchname> > > > > <edit> > > > > $APP refresh # this is the commit --amend part > > Yeah. Sounds like you'd just need a "--edit-this $commit" flag to rebase > -i. Still, very inconvenient (IMO) when you are working _on_ lots of patches. > Out of curiousity, what happens if you say "push" several times, > _without_ popping the patch? And what happens if you "push" several times > with the _same_ patchname? In addition to the patches, there's also ordering information for those patches (the series file) - in the simplest case it is a stack in the traditinal Comp Sci meaning. IOW, if you have patches {foo,bar,baz} and you want to push "bar", the patch "foo" will also get pushed. When you push a patch, the software makes note of the fact (status file in Guilt). If you try to push the same patch twice, it'll tell you that the patch is already applied. The Mercurial Book has a section about Mercurial Queues (Mercurial's implementation of something similar to Guilt/stgit) which describes the concepts rather well [1]. I think that figure 12.10 [2] really explains the whole thing pretty well. Of course, there is always the quilt doc (big PDF which has the whole history, etc., etc.). Hrm, it just occured to me that the quilt-way of managing patches is the basic concept of a turing machine - infinite tape which is seekable and you can read/write to the "current" position (topmost applied patch). :) Josef 'Jeff' Sipek. [1] http://hgbook.red-bean.com/hgbookch12.html#x16-27200012.5 [2] http://hgbook.red-bean.com/hgbookch12.html#x16-27600310 -- Computer Science is no more about computers than astronomy is about telescopes. - Edsger Dijkstra - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html