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

Re: Fwd: What is the best way to backport a feature?

From
Johannes Sixt <j6t@kdbg.org>
Date
Nov 29, 2009, 18:33 UTC
Message-ID
<200911291933.54301.j6t@kdbg.org>
In-Reply-To
<4db3b0200911290945r34a73346w148ee42e59868876@mail.gmail.com>
[please keep the Cc list]
On Sonntag, 29. November 2009, Peter Weseloh wrote:
Show 5 quoted lines
> But on the other hand the intermediate merges from the Mainline make
> for much simpler merges, right?.
> If merging is done only when Feature_A is ready it might become a real
> pain. It might take several month to complete it and the mainline
> might have changed a lot.
Incidentally, Junio has blogged about this just the other day:
http://gitster.livejournal.com/42247.html

Basically, as soon as you merge Mainline into Feature_A, you change the topic of Feature_A from "Feature for Release_1.0" to "Feature for this Mainline". Clearly, this topic is not suitable for Release_1.0 anymore.

There is a way around this that doesn't sacrifice the topic-oriented nature of the branch: You keep developing Feature_A as planned for Release_1.0 and when you notice that merging this feature to Mainline will become increasingly complex, you fork off a new branch Feature_A_for_Release_2.0 from Mainline and merge Feature_A into this new branch:

   o--o--o                    Release_1.0
  /    \  \
 o-o-o--o--o-o-o-o-X-o---o--o Mainline
      \             \
       F1            o--o     Feature_A_for_Release_2.0   
        \           /  /
         F2--------F3-F4      Feature_A
The fork point X must be in Release_2.0.
-- Hannes
Previous: Peter WeselohNext: Peter Weseloh
Message 8 of 10 in “What is the best way to backport a feature?”
  1. Peter WeselohNov 29, 2009
  2. Björn SteinbrinkNov 29, 2009
  3. Pascal ObryNov 29, 2009
  4. Pascal ObryNov 29, 2009
  5. Michael J GruberNov 29, 2009
  6. Greg A. WoodsNov 30, 2009
  7. Fwd: What is the best way to backport a feature?Peter Weseloh, Nov 29, 2009
  8. Johannes SixtNov 29, 2009
  9. Peter WeselohNov 29, 2009
  10. Björn SteinbrinkNov 29, 2009

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.