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

Re: Rollback of git commands

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Nov 28, 2007, 21:47 UTC
Message-ID
<Pine.LNX.4.64.0711281600320.5349@iabervon.org>
In-Reply-To
<9e4733910711280713n6b439866m55bea4824efd959@mail.gmail.com>
On Wed, 28 Nov 2007, Jon Smirl wrote:
Show 11 quoted lines
> all my patches applied
> git rebase
> cursing.... I immediately knew what I had done
> update stg and install it
> stg repair
> four of my 15 patches tried to apply, I received messages that there
> were all empty
> most stg commands won't work, they complain that the commit references
> in the stg .git/* state are not correct.
> 
> I then proceed to manually attempt repair.

This sounds like the content of the applied patches got pulled into the non-stgit history of the branch it's working on, sort of like a stg commit except that stgit didn't know you'd done it. Then cleaning everything up from stgit's perspective caused all of those patches to become empty, since they were already applied in the base.

I think fundamental issue you're having is that stgit is implementing the functionality of quilt using git's engine, not providing a version control system for patch series, which is what you really want. I've actually been working on a design for a git builtin for the idea that the patch series is your work product, and you want to version control that (additionally, you want to use git's engine to help with working on the series and represent it).

Out of curiousity, are you using stgit as an integrator (with your work being keeping a collection of patches produced separately up-to-date) or as a patch developer (with your work being producing a state containing a single large new feature while maintaining this change as a series of self-contained patches)? I've been thinking primarily about the integrator task, in part because I've found it easy enough to do the developer task without anything other than current git. (That is, "git rebase -i" seems to work fine for making changes to a single logical patch series, all of whose patches are prepared locally and aren't independantly named in some particular fashion; the things that aren't handled are "I need to replace the pull of netdev.git with a new pull of netdev.git" or "I need to replace '[PATCH] fix-the-frobnozzle-gadget' with '[PATCH v2] fix-the-frobnozzle-gadget'.)

The developer assist I'd actually like to see is: "I've got a single commit on top of a series of commits on top of an upstream commit; I want to distribute the changes made in the final commit to points in the series where the code that gets replaced (or context that gets inserted into) in the final commit gets introduced, with interactive stuff for sticking other hunks into particular commits or into new commits at some point in the series." That is, I want to do my revision of a patch series on the final commit of the series, and then have these changes distributed to the appropriate points, rather than doing work on intermediate states (unless what I'm fixing is stub code that gets replaced again in a later patch).

	-Daniel
*This .sig left intentionally blank*
Previous: Jon SmirlNext: Steven Grimm
Message 27 of 31 in “Rollback of git commands”
  1. Jon SmirlNov 27, 2007
  2. Junio C HamanoNov 28, 2007
  3. Jon SmirlNov 28, 2007
  4. Jon SmirlNov 28, 2007
  5. David SymondsNov 28, 2007
  6. Ingo MolnarNov 28, 2007
  7. Sergei OrganovNov 28, 2007
  8. Nicolas PitreNov 28, 2007
  9. Geert BoschNov 28, 2007
  10. Jeff KingNov 28, 2007
  11. Jon SmirlNov 28, 2007
  12. Jeff KingNov 28, 2007
  13. SeanNov 28, 2007
  14. Jon SmirlNov 28, 2007
  15. SeanNov 28, 2007
  16. Jon SmirlNov 28, 2007
  17. Nicolas PitreNov 28, 2007
  18. Jon SmirlNov 28, 2007
  19. Nicolas PitreNov 28, 2007
  20. Jon SmirlNov 28, 2007
  21. Nicolas PitreNov 28, 2007
  22. Jon SmirlNov 28, 2007
  23. Karl HasselströmNov 29, 2007
  24. Junio C HamanoNov 28, 2007
  25. Karl HasselströmNov 28, 2007
  26. Jon SmirlNov 28, 2007
  27. Daniel BarkalowNov 28, 2007
  28. Steven GrimmNov 28, 2007
  29. Daniel BarkalowNov 28, 2007
  30. Jon SmirlNov 28, 2007
  31. Theodore TsoNov 29, 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.