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

Prune-safe StGIT (was Re: Two crazy proposals for changing git's diff commands)

From
CMCatalin Marinas <catalin.marinas@gmail.com>
Date
Feb 13, 2006, 22:00 UTC
Message-ID
<43F1016E.5070203@gmail.com>
In-Reply-To
<slrnduphvr.2i8.mdw@metalzone.distorted.org.uk>
Mark Wooding wrote:
> (I really look forward to a StGIT which can withstand git-prune.)

Since there were a few requests for this feature, I pushed it to the public repository (and also included it in the latest snapshot).

As it was discussed a few months ago, the top id of each patch (including the popped ones) is added to the .git/refs/patches/<branch>/<patch> file. The git-prune command will preserve these objects and their referents, making even the unapplied patches safe. There is another advantage with this approach - gitk shows the patch name for every corresponding commit.

Running any command (apart from help) on the current branch would create the initial references. You would need to do the same with all the other branches. Since this is a new feature, make sure you have backups before pruning (though it worked OK for me).

-- Catalin

Previous: Catalin MarinasNext: Kent Engstrom
Message 24 of 30 in “Two crazy proposals for changing git's diff commands”
  1. Carl WorthFeb 9, 2006
  2. Linus TorvaldsFeb 9, 2006
  3. Linus TorvaldsFeb 9, 2006
  4. Carl WorthFeb 9, 2006
  5. Junio C HamanoFeb 9, 2006
  6. Junio C HamanoFeb 9, 2006
  7. Junio C HamanoFeb 9, 2006
  8. Linus TorvaldsFeb 9, 2006
  9. Junio C HamanoFeb 9, 2006
  10. Junio C HamanoFeb 10, 2006
  11. Comments on "status -v" (was: Two crazy proposals for changing git's diff commands)Carl Worth, Feb 10, 2006
  12. Junio C HamanoFeb 10, 2006
  13. Linus TorvaldsFeb 10, 2006
  14. Junio C HamanoFeb 10, 2006
  15. Petr BaudisFeb 10, 2006
  16. Junio C HamanoFeb 10, 2006
  17. Carl WorthFeb 9, 2006
  18. Junio C HamanoFeb 10, 2006
  19. Carl WorthFeb 10, 2006
  20. Junio C HamanoFeb 10, 2006
  21. Carl WorthFeb 10, 2006
  22. Mark WoodingFeb 10, 2006
  23. Catalin MarinasFeb 13, 2006
  24. Prune-safe StGIT (was Re: Two crazy proposals for changing git's diff commands)Catalin Marinas, Feb 13, 2006
  25. Kent EngstromFeb 10, 2006
  26. Junio C HamanoFeb 11, 2006
  27. Add howto about separating topics.kent@lysator.liu.se, Feb 12, 2006
  28. J. Bruce FieldsFeb 12, 2006
  29. Junio C HamanoFeb 12, 2006
  30. Tim LarsonFeb 9, 2006

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.