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

Re: nicer frontend to get rebased tree?

From
Theodore Tso <tytso@mit.edu>
Date
Aug 23, 2008, 23:01 UTC
Message-ID
<20080823230110.GC18169@mit.edu>
In-Reply-To
<20080823165350.GY23334@one.firstfloor.org>
On Sat, Aug 23, 2008 at 06:53:50PM +0200, Andi Kleen wrote:
Show 8 quoted lines
> > If you are thinking about 'linux-next', it is exception rather than
> > the rule.
> 
> No you're wrong. The majority of Linux trees I have to deal with 
> do it now and then. And I must say I also understand why 
> they want it -- they want a clean history on top of Linus' tree.
> Otherwise there is no chance to find the own changes again
> after a few thousands other merges.

What I don't understand is in what context do you need to deal with "the majority of Linux trees"? Sure, the ext4 tree gets rebased all the time. But that's because it's a "leaf" tree; it means that people can't base development trees off of the ext4 tree as a result. But then again, that's not what the ext4 git tree is intended for! It's like in Java when you declare a class with the 'final' keyword; such classes can't be subclassed.

The main use of the ext4 git tree is to allow people to more easily pull changes into their own trees, either for building their own integration trees, or their own personal private trees. It's simply a much more efficient way of applying a large number of patch queues. So for example, when I build my personal kernel that I use on my laptops, servers, et. al, I start with ext4 and pull in various "fixes" branches that I've needed over time to build a useful, stable kernel. So I have a personal merge script which does:

git branch -f master linus/master git checkout master git merge tp_smapi-0.37 git merge remotes/libata-dev/upstream-fixes git merge remotes/ibm-acpi/for-upstream/acpi-release git merge misc-fixes git merge ext4dev

... and the result is an integration tree that always treet as throwaway, because I've merged in trees which are indeed throwaway. If I *do* any development work on this tree, say I cheat and fix some ext4 bugs on this tree instead of the ext4 branch, I always will go back to the ext4 branch, and use "git cherry-pick" to move those changes back to the ext4 tree.

Show 5 quoted lines
> > First, there isn't just _one_ way to deal with non fast-forward 
> > (rebased) branch; there are many possible workflow wrt rebasing.
> 
> I don't doubt there are a million ways to do it somehow in
> all kinds of convoluted ways. And that's exactly the problem.

There are, but the simpliest way to win (as the movie "Wargames" put it), is not to play. Just don't put commits on top of a non-terminal trees; just use them to pull to create throw-away trees for building/testing, for integration testing or to build your own personal kernels. The only time when you really need to build on top of others' trees is if you have changes that depend on patches in another tree, which in practice should happen rarely; and if it does, you can ask the other maintainer to push the changes to Linus first.

In that case, what you can do is put a placeholder patch in your tree, with a note in the commit log that this is a placeholder is pending someone else pushing the equivalent patch to Linus, and once they push it to Linus, when you do a rebase it will disappear. In practice, this happens so rarely that doing this manually with manual coordination between maintainers about who pushes a patch to Linus really isn't that big of a deal.

						- Ted
Previous: Jakub NarebskiNext: Theodore Tso
Message 40 of 42 in “nicer frontend to get rebased tree?”
  1. Andi KleenAug 22, 2008
  2. Linus TorvaldsAug 22, 2008
  3. Andi KleenAug 22, 2008
  4. Linus TorvaldsAug 22, 2008
  5. Paolo CiarrocchiAug 22, 2008
  6. Linus TorvaldsAug 22, 2008
  7. Björn SteinbrinkAug 22, 2008
  8. Paolo CiarrocchiAug 22, 2008
  9. Linus TorvaldsAug 22, 2008
  10. Junio C HamanoAug 22, 2008
  11. Andi KleenAug 23, 2008
  12. Paolo BonziniAug 23, 2008
  13. Andi KleenAug 23, 2008
  14. Paolo BonziniAug 23, 2008
  15. Linus TorvaldsAug 23, 2008
  16. Andi KleenAug 23, 2008
  17. Linus TorvaldsAug 23, 2008
  18. Ingo MolnarAug 25, 2008
  19. Björn SteinbrinkAug 23, 2008
  20. Linus TorvaldsAug 23, 2008
  21. Björn SteinbrinkAug 23, 2008
  22. Documentating branches (was: nicer frontend to get rebased tree?)Marius Vollmer, Aug 23, 2008
  23. Miklos VajnaAug 23, 2008
  24. Marius VollmerAug 23, 2008
  25. Marius VollmerAug 23, 2008
  26. Avery PennarunAug 22, 2008
  27. Andi KleenAug 22, 2008
  28. Paolo CiarrocchiAug 22, 2008
  29. Jakub NarebskiAug 22, 2008
  30. Andi KleenAug 23, 2008
  31. Paolo CiarrocchiAug 23, 2008
  32. Jakub NarebskiAug 23, 2008
  33. Andi KleenAug 23, 2008
  34. Paolo CiarrocchiAug 23, 2008
  35. Linus TorvaldsAug 23, 2008
  36. Paolo CiarrocchiAug 23, 2008
  37. Björn SteinbrinkAug 23, 2008
  38. Junio C HamanoAug 24, 2008
  39. Jakub NarebskiAug 23, 2008
  40. Theodore TsoAug 23, 2008
  41. A proposed solution (Was: nicer frontend to get rebased tree?)Theodore Tso, Aug 23, 2008
  42. Mikael MagnussonAug 22, 2008

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.