git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Some ideas for StGIT

From
JSJosef Sipek <jsipek@fsl.cs.sunysb.edu>
Date
Aug 5, 2007, 14:57 UTC
Message-ID
<20070805145712.GB4570@filer.fsl.cs.sunysb.edu>
In-Reply-To
<Pine.LNX.4.64.0708051513310.14781@racer.site>
On Sun, Aug 05, 2007 at 03:15:29PM +0100, Johannes Schindelin wrote:
Show 39 quoted lines
> 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
Previous: Johannes SchindelinNext: Yann Dirson
Message 13 of 32 in “Some ideas for StGIT”
  1. Pavel RoskinAug 3, 2007
  2. Andy ParkinsAug 3, 2007
  3. Pavel RoskinAug 4, 2007
  4. Shawn O. PearceAug 4, 2007
  5. Pavel RoskinAug 5, 2007
  6. Jakub NarebskiAug 5, 2007
  7. Shawn O. PearceAug 5, 2007
  8. Junio C HamanoAug 5, 2007
  9. Josef SipekAug 5, 2007
  10. Johannes SchindelinAug 5, 2007
  11. Josef SipekAug 5, 2007
  12. Johannes SchindelinAug 5, 2007
  13. Josef SipekAug 5, 2007
  14. Yann DirsonAug 4, 2007
  15. Catalin MarinasAug 6, 2007
  16. Chris ShoemakerAug 4, 2007
  17. Johannes SchindelinAug 4, 2007
  18. Yann DirsonAug 3, 2007
  19. Catalin MarinasAug 6, 2007
  20. Pavel RoskinAug 6, 2007
  21. Josef SipekAug 6, 2007
  22. Theodore TsoAug 4, 2007
  23. Yann DirsonAug 4, 2007
  24. Josef SipekAug 4, 2007
  25. Pavel RoskinAug 5, 2007
  26. Catalin MarinasAug 6, 2007
  27. Karl HasselströmAug 6, 2007
  28. Pavel RoskinAug 6, 2007
  29. Karl HasselströmAug 6, 2007
  30. Catalin MarinasAug 23, 2007
  31. Karl HasselströmAug 23, 2007
  32. Pavel RoskinAug 6, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.