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

Re: rethinking patch management with GIT / topgit

From
TKThomas Koch <thomas@koch.ro>
Date
Mar 23, 2010, 08:09 UTC
Message-ID
<201003230909.16414.thomas@koch.ro>
In-Reply-To
<20100322193035.GM3533@machine.or.cz>
Petr Baudis:
Show 14 quoted lines
> On Mon, Mar 22, 2010 at 08:59:40AM +0100, Thomas Koch wrote:
> > In all three cases you're free to either keep or throw away the old
> > patchset.
> 
> Yes, but to the same degree e.g. with StGIT I'm free to keep the head of
> the old patch series. That does not mean the operation *preserves* the
> history, only that the history is still around somewhere in the
> repository, however it won't be around in other incarnations of the
> repository and it will not be connected in any way to the current
> version of the patchset.
> 
> Yes, if you are lucky you can figure out the name of the previous
> version, but it's like starting development of each new kernel version
> by a clean import of the sources.
Hi Petr,
let me copy the list of methods from my last mail:
1) checkout new patch branches from the top of the old patch branches and 
merge upstream into each of them
2) recreate (like rebase) the full history of the patch branches on top of the 
new upstream
3) collapse the branch history and create one commit per patch branch on top 
of the new upstream
>From these methods, 3) loses all history, 2) loses some history but preserves 
the individual history of one patch branch on a new base and 1) preserves all 
history. Let me give an example for method 1). 
You've got a patchset identified by the prefix debian/. Now you want to 
package a new upstream but need to retain the old patchset in case of security 
updates in Debian stable. Debian stable has version 0.1, new upstream is 0.2.
So you
- rename the old patchset from debian/ to debian-0.1/
- clone/copy/recreate (pick a name) a new patchset debian/ on top of 
upstream/0.2. This is done by merging upstream/0.2 into each debian/* branch.
- Once you don't maintain version 0.1 anymore, you can delete the debian-0.1/* 
branches

After these steps, the debian/ branch still contains pointers to all commits from the debian-0.1/* branches. It's an additional question, how to deal with commits that are done in debian-0.1/* after the new upstream merge.

Best regards,
Thomas Koch, http://www.koch.ro
Previous: Petr Baudis
Message 7 of 7 in “rethinking patch management with GIT / topgit”
  1. Thomas KochMar 20, 2010
  2. Petr BaudisMar 20, 2010
  3. Thomas KochMar 20, 2010
  4. Petr BaudisMar 21, 2010
  5. Thomas KochMar 22, 2010
  6. Petr BaudisMar 22, 2010
  7. Thomas KochMar 23, 2010

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.