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

Re: Kernel headers git tree

From
Junio C Hamano <junkio@cox.net>
Date
Jul 14, 2006, 18:01 UTC
Message-ID
<7v64i0qd4d.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<1152869915.3191.12.camel@pmac.infradead.org>
David Woodhouse <dwmw2@infradead.org> writes:
Show 11 quoted lines
> Yet what I actually want in the final result is "those commits which
> change the result of the _exported_ headers". It's slightly less
> realistic to want rev-list to find that for me directly from the
> original kernel tree without having done the export step in stage1 --
> what I need to do is create the exported header tree for each commit
> which _might_ change it, then filter out the commits which don't
> _actually_ change it.
>
> The extra commits in the stage1 branch are cheap enough -- by definition
> they don't lead to any extra tree or blob objects. I think the two-stage
> export is probably the best approach, unless I'm missing something.

Since you are not building an exact parallel history with the same topology (you are trying to cull the commits in the new tree that do not change the resulting header files), I do not see much point in the parent conversion loop in the first script to compute CONVERTEDPARENTS.

How about making it simpler?
	* Keep the current HEAD of the "headers" branch at in
          refs/heads/kernel-headers
	* Whenever you see $UPSTREAM_GITDIR/refs/heads/master
          changes, you do your converttree to come up with the
          new header tree
	* See if the resulting tree changed by doing something
          like this:
                TREE=`converttree $INCDIR $KBUILDASMSHA`
                case "`git diff-tree --name-only kernel-headers $TREE`" in
                '')
                        # No changes in the result
                        exit
                esac
	  Stop processing here if there is no change.
	* Make a new commit, with its parent set to the current
          value of refs/heads/kernel-headers, perhaps with the
          same message as $UPSTREAM_GITDIR/refs/heads/master
          has as you do already.
	* Advance refs/heads/kernel-headers only when you
          actually make a new commit.

I would further suggest to record the value of the upstream commit object name, $UPSTREAM_GITDIR/refs/heads/master, somewhere in the commit message, by using "git describe". This will help people who use your converted headers to know which released version of the Linus kernel the headers correspond to, and also help you notice when the upstream is updated during the next run.

Previous: Alex RiesenNext: David Woodhouse
Message 21 of 27 in “Kernel headers git tree”
  1. David WoodhouseJul 13, 2006
  2. Junio C HamanoJul 14, 2006
  3. David WoodhouseJul 14, 2006
  4. Linus TorvaldsJul 14, 2006
  5. Junio C HamanoJul 14, 2006
  6. Linus TorvaldsJul 14, 2006
  7. David WoodhouseJul 14, 2006
  8. Linus TorvaldsJul 14, 2006
  9. David WoodhouseJul 14, 2006
  10. Linus TorvaldsJul 14, 2006
  11. Daniel BarkalowJul 14, 2006
  12. David WoodhouseJul 14, 2006
  13. Daniel BarkalowJul 14, 2006
  14. Linus TorvaldsJul 14, 2006
  15. David WoodhouseJul 14, 2006
  16. Linus TorvaldsJul 14, 2006
  17. Trivial path optimization testAlex Riesen, Jul 17, 2006
  18. Junio C HamanoJul 24, 2006
  19. Alex RiesenJul 24, 2006
  20. Trivial path optimization testAlex Riesen, Jul 24, 2006
  21. Junio C HamanoJul 14, 2006
  22. David WoodhouseJul 14, 2006
  23. Ian CampbellJul 14, 2006
  24. Junio C HamanoJul 14, 2006
  25. Ingo OeserJul 14, 2006
  26. David WoodhouseJul 14, 2006
  27. Ingo OeserJul 18, 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.