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

Re: How to switch kernel customizations from 2.6.15.6 to 2.6.16?

From
Shawn Pearce <spearce@spearce.org>
Date
Mar 29, 2006, 02:23 UTC
Message-ID
<20060329022330.GA15359@spearce.org>
In-Reply-To
<1143596622.2481.10.camel@mattlaptop.metaesthetics.net>
Matt McCutchen <hashproduct@verizon.net> wrote:
Show 18 quoted lines
> Dear git people,
> 
> I made a customized Linux kernel based on 2.6.15.6 by cloning the stable
> 2.6.15 kernel repository (which was then at version 2.6.15.6) and making
> several commits.  Now I would like a Linux kernel based on 2.6.16 with
> the same customizations.  This seems to be a very simple task, but I
> have been trying various combinations of git commands for several days
> and have not figured out how to do it.
> 
> I believe that means I should pull the 2.6.16 kernel into the "origin"
> branch and then rebase the "master" branch, merging my customizations
> with 2.6.16.  To this end, I switched my remote file to point to the
> 2.6.16 stable repository and tried to pull.  The result was not what I
> wanted.  The situation is complicated by the fact that 2.6.15.6 is not
> an ancestor of 2.6.16.  The warning in the man page about branches that
> are modified nonlinearly seems to apply.
> 
> How do I make my customized 2.6.16 kernel?

I think you want to use `git-fetch --force` to download origin but not immediately merge it yet. This will bypass the not-an-ancestor check you are running into.

Then you can perform the rebase yourself with:
	# Export your local changes into a series of patches.
	#
	git-format-patch -k --stdout --full-index v2.6.16.6 >changes.mbox
	# Checkout the new origin (2.6.16) into master.
	#
	git-reset --hard origin
	# Now apply your patches.
	#
	git-am --binary -3 changes.mbox

If you get merge conflicts fix them up and restart with `git-am --resolved`.

Note this is the logic of `git-rebase` except it doesn't require you to actually have a common ancestor, while `git-rebase` does.

-- 
Shawn.
Previous: Junio C HamanoNext: Junio C Hamano
Message 13 of 19 in “How to switch kernel customizations from 2.6.15.6 to 2.6.16?”
  1. Matt McCutchenMar 29, 2006
  2. Linus TorvaldsMar 29, 2006
  3. Junio C HamanoMar 29, 2006
  4. Junio C HamanoMar 29, 2006
  5. Linus TorvaldsMar 29, 2006
  6. Linus TorvaldsMar 29, 2006
  7. Junio C HamanoMar 29, 2006
  8. Jakub NarebskiMar 30, 2006
  9. Junio C HamanoMar 30, 2006
  10. Linus TorvaldsMar 30, 2006
  11. Junio C HamanoMar 30, 2006
  12. Junio C HamanoMar 30, 2006
  13. Shawn PearceMar 29, 2006
  14. Junio C HamanoMar 29, 2006
  15. Matt McCutchenMar 30, 2006
  16. Junio C HamanoMar 30, 2006
  17. Matt McCutchenMar 30, 2006
  18. Linus TorvaldsMar 30, 2006
  19. Matt McCutchenMar 30, 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.