From 46dcd9fd73cbefd62f386e6dad98bd7f28556f98 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Mon, 28 Jan 2013 13:00:59 -0600 Subject: kernel-dev: Added "Inspecting Changes and Commits" section A Section about seeing what has changed in a kernel tree was moved from the old YP Kernel Architecture and Use Manual to this new manual. The section moved was "Change Inspection: Changes/Commits". In addition to moving the sections, I shortened them up by removing verbose parts of the section. (From yocto-docs rev: 2c620ea2bed0844b70b497dfa461c0b364312e39) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/kernel-dev/kernel-dev-common.xml | 108 +++++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/documentation/kernel-dev/kernel-dev-common.xml b/documentation/kernel-dev/kernel-dev-common.xml index f6c027e7c5..235bc41525 100644 --- a/documentation/kernel-dev/kernel-dev-common.xml +++ b/documentation/kernel-dev/kernel-dev-common.xml @@ -667,6 +667,114 @@ to include in the image. + +
+ Inspecting Changes and Commits + + + A common question when working with a kernel is: + "What changes have been applied to this tree?" + Rather than using "grep" across directories to see what has + changed, you can use Git to inspect or search the kernel tree. + Using Git is an efficent way to see what has changed in the tree. + + +
+ What Changed in a Kernel? + + + Following are a few examples that show how to use Git + commands to examine changes. + These examples are by no means the only way to see changes. + + In the following examples, unless you provide a commit + range, kernel.org history is blended + with Yocto Project kernel changes. + You can form ranges by using branch names from the + kernel tree as the upper and lower commit markers with + the Git commands. + You can see the branch names through the web interface + to the Yocto Project source repositories at + . + + To see a full range of the changes, use the + git whatchanged command and specify a + commit range for the branch + (<commit>..<commit>). + + + + Here is an example that looks at what has changed in the + emenlow branch of the + linux-yocto-3.4 kernel. + The lower commit range is the commit associated with the + standard/base branch, while + the upper commit range is the commit associated with the + standard/emenlow branch. + + $ git whatchanged origin/standard/base..origin/standard/emenlow + + + + + To see short, oneline summaries of changes use the + git log command: + + $ git log --oneline origin/standard/base..origin/standard/emenlow + + + + + Use this command to see code differences for the changes: + + $ git diff origin/standard/base..origin/standard/emenlow + + + + + Use this command to see the commit log messages and the + text differences: + + $ git show origin/standard/base..origin/standard/emenlow + + + + + Use this command to create individual patches for + each change. + Here is an example that that creates patch files for each + commit and places them in your Documents + directory: + + $ git format-patch -o $HOME/Documents origin/standard/base..origin/standard/emenlow + + +
+ +
+ Showing a Particular Feature or Branch Change + + + Tags in the Yocto Project kernel tree divide changes for + significant features or branches. + The git show <tag> command shows + changes based on a tag. + Here is an example that shows systemtap + changes: + + $ git show systemtap + + You can use the + git branch --contains <tag> command + to show the branches that contain a particular feature. + This command shows the branches that contain the + systemtap feature: + + $ git branch --contains systemtap + + +
+