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

Re: [RFC] Stgit - patch history / add extra parents

From
CMCatalin Marinas <catalin.marinas@gmail.com>
Date
Aug 19, 2005, 09:53 UTC
Message-ID
<tnx64u2p81k.fsf@arm.com>
In-Reply-To
<20050818195753.GA9066@fanta>
Jan Veldeman <jan.veldeman@gmail.com> wrote:
Show 5 quoted lines
> I like stgit very much, but I feel there is still something missing:
> stgit is very handy when you use it for patches which should be pushed to
> mainline rather quickly. But for pacthes which won't be pushed immediately
> to mainline, it would be usefull to have a history of the patches
> itself.

The patch history feature was available in StGIT 0.1/0.2 releases where you should have run a 'stg commit' before 'stg refresh'. The commit was handling all the history changes, with separate commit messages and refresh was updating the main commit with 2 parents. I removed it in 0.3 after some people (I think it was Paul Jackson and Daniel Barkalow) convinced me that this would make it yet another SCM interface on top of GIT, which wasn't really my intention.

The main problem with having multiple parents for a commit object corresponding to a patch is the upstream merging via 'git pull'. In general you don't want a gatekeeper to pull the history of your patch but the patch only.

> The patch below, together with the following script could be used to
> make snapshots of the patch stack (I call it freeze, as I thought snapshot
> was already going to be used for something else):

'snapshot' is not yet used for anything and I'm not sure how it is best to be implemented. I thought about simply saving the current HEAD into some .git/refs/heads/<file>, without preserving any history for the patch. A gitk on this file would show the patches as they were on the time of the snapshot creation. A new snapshot would remove this.

It might be best for a per-patch history to have a separate file in <branch>/<patch>/, maybe called freeze, which keeps this history information. The top one should remain unchanged. Its hash could be accessed with the 'stg id /freeze' command (implemented yesterday). This file would only be updated via the 'freeze' command and its parent would be the previous freeze value.

Would this be close to what you need?
-- 
Catalin
Previous: Jan VeldemanNext: Jan Veldeman
Message 2 of 22 in “[RFC] Stgit - patch history / add extra parents”
  1. Jan VeldemanAug 18, 2005
  2. Catalin MarinasAug 19, 2005
  3. Jan VeldemanAug 19, 2005
  4. Catalin MarinasAug 19, 2005
  5. Jan VeldemanAug 19, 2005
  6. Catalin MarinasAug 20, 2005
  7. Jan VeldemanAug 21, 2005
  8. Daniel BarkalowAug 22, 2005
  9. Catalin MarinasAug 23, 2005
  10. Daniel BarkalowAug 23, 2005
  11. Jan VeldemanAug 23, 2005
  12. Daniel BarkalowAug 23, 2005
  13. Jan VeldemanAug 25, 2005
  14. Daniel BarkalowAug 25, 2005
  15. Catalin MarinasAug 31, 2005
  16. Catalin MarinasAug 31, 2005
  17. Catalin MarinasAug 30, 2005
  18. Jan VeldemanAug 31, 2005
  19. Daniel BarkalowAug 31, 2005
  20. Junio C HamanoAug 24, 2005
  21. Linus TorvaldsAug 24, 2005
  22. Junio C HamanoAug 23, 2005

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.