diff options
author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2013-01-28 13:00:59 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-30 14:10:03 +0000 |
commit | 46dcd9fd73cbefd62f386e6dad98bd7f28556f98 (patch) | |
tree | 9cde1db7fc2a4e5cb2683402041d585618ec4b3c /documentation/kernel-dev/kernel-dev-common.xml | |
parent | d36e4792e7e4061f65fda41af2a0c931f5596052 (diff) | |
download | poky-46dcd9fd73cbefd62f386e6dad98bd7f28556f98.tar.gz |
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 <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/kernel-dev/kernel-dev-common.xml')
-rw-r--r-- | documentation/kernel-dev/kernel-dev-common.xml | 108 |
1 files changed, 108 insertions, 0 deletions
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 @@ | |||
667 | to include in the image. | 667 | to include in the image. |
668 | </para> | 668 | </para> |
669 | </section> | 669 | </section> |
670 | |||
671 | <section id='inspecting-changes-and-commits'> | ||
672 | <title>Inspecting Changes and Commits</title> | ||
673 | |||
674 | <para> | ||
675 | A common question when working with a kernel is: | ||
676 | "What changes have been applied to this tree?" | ||
677 | Rather than using "grep" across directories to see what has | ||
678 | changed, you can use Git to inspect or search the kernel tree. | ||
679 | Using Git is an efficent way to see what has changed in the tree. | ||
680 | </para> | ||
681 | |||
682 | <section id='what-changed-in-a-kernel'> | ||
683 | <title>What Changed in a Kernel?</title> | ||
684 | |||
685 | <para> | ||
686 | Following are a few examples that show how to use Git | ||
687 | commands to examine changes. | ||
688 | These examples are by no means the only way to see changes. | ||
689 | <note> | ||
690 | In the following examples, unless you provide a commit | ||
691 | range, <filename>kernel.org</filename> history is blended | ||
692 | with Yocto Project kernel changes. | ||
693 | You can form ranges by using branch names from the | ||
694 | kernel tree as the upper and lower commit markers with | ||
695 | the Git commands. | ||
696 | You can see the branch names through the web interface | ||
697 | to the Yocto Project source repositories at | ||
698 | <ulink url='http://git.yoctoproject.org/cgit.cgi'></ulink>. | ||
699 | </note> | ||
700 | To see a full range of the changes, use the | ||
701 | <filename>git whatchanged</filename> command and specify a | ||
702 | commit range for the branch | ||
703 | (<filename><commit>..<commit></filename>). | ||
704 | </para> | ||
705 | |||
706 | <para> | ||
707 | Here is an example that looks at what has changed in the | ||
708 | <filename>emenlow</filename> branch of the | ||
709 | <filename>linux-yocto-3.4</filename> kernel. | ||
710 | The lower commit range is the commit associated with the | ||
711 | <filename>standard/base</filename> branch, while | ||
712 | the upper commit range is the commit associated with the | ||
713 | <filename>standard/emenlow</filename> branch. | ||
714 | <literallayout class='monospaced'> | ||
715 | $ git whatchanged origin/standard/base..origin/standard/emenlow | ||
716 | </literallayout> | ||
717 | </para> | ||
718 | |||
719 | <para> | ||
720 | To see short, oneline summaries of changes use the | ||
721 | <filename>git log</filename> command: | ||
722 | <literallayout class='monospaced'> | ||
723 | $ git log --oneline origin/standard/base..origin/standard/emenlow | ||
724 | </literallayout> | ||
725 | </para> | ||
726 | |||
727 | <para> | ||
728 | Use this command to see code differences for the changes: | ||
729 | <literallayout class='monospaced'> | ||
730 | $ git diff origin/standard/base..origin/standard/emenlow | ||
731 | </literallayout> | ||
732 | </para> | ||
733 | |||
734 | <para> | ||
735 | Use this command to see the commit log messages and the | ||
736 | text differences: | ||
737 | <literallayout class='monospaced'> | ||
738 | $ git show origin/standard/base..origin/standard/emenlow | ||
739 | </literallayout> | ||
740 | </para> | ||
741 | |||
742 | <para> | ||
743 | Use this command to create individual patches for | ||
744 | each change. | ||
745 | Here is an example that that creates patch files for each | ||
746 | commit and places them in your <filename>Documents</filename> | ||
747 | directory: | ||
748 | <literallayout class='monospaced'> | ||
749 | $ git format-patch -o $HOME/Documents origin/standard/base..origin/standard/emenlow | ||
750 | </literallayout> | ||
751 | </para> | ||
752 | </section> | ||
753 | |||
754 | <section id='showing-a-particular-feature-or-branch-change'> | ||
755 | <title>Showing a Particular Feature or Branch Change</title> | ||
756 | |||
757 | <para> | ||
758 | Tags in the Yocto Project kernel tree divide changes for | ||
759 | significant features or branches. | ||
760 | The <filename>git show <tag></filename> command shows | ||
761 | changes based on a tag. | ||
762 | Here is an example that shows <filename>systemtap</filename> | ||
763 | changes: | ||
764 | <literallayout class='monospaced'> | ||
765 | $ git show systemtap | ||
766 | </literallayout> | ||
767 | You can use the | ||
768 | <filename>git branch --contains <tag></filename> command | ||
769 | to show the branches that contain a particular feature. | ||
770 | This command shows the branches that contain the | ||
771 | <filename>systemtap</filename> feature: | ||
772 | <literallayout class='monospaced'> | ||
773 | $ git branch --contains systemtap | ||
774 | </literallayout> | ||
775 | </para> | ||
776 | </section> | ||
777 | </section> | ||
670 | </chapter> | 778 | </chapter> |
671 | <!-- | 779 | <!-- |
672 | vim: expandtab tw=80 ts=4 | 780 | vim: expandtab tw=80 ts=4 |