summaryrefslogtreecommitdiffstats
path: root/documentation/contributor-guide/submit-changes.rst
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/contributor-guide/submit-changes.rst')
-rw-r--r--documentation/contributor-guide/submit-changes.rst90
1 files changed, 89 insertions, 1 deletions
diff --git a/documentation/contributor-guide/submit-changes.rst b/documentation/contributor-guide/submit-changes.rst
index 47a416b245..6d5d69d7cf 100644
--- a/documentation/contributor-guide/submit-changes.rst
+++ b/documentation/contributor-guide/submit-changes.rst
@@ -65,6 +65,13 @@ use to identify your commits::
65 git config --global user.name "Ada Lovelace" 65 git config --global user.name "Ada Lovelace"
66 git config --global user.email "ada.lovelace@gmail.com" 66 git config --global user.email "ada.lovelace@gmail.com"
67 67
68By default, Git adds a signature line at the end of patches containing the Git
69version. We suggest to remove it as it doesn't add useful information.
70
71Remove it with the following command::
72
73 git config --global format.signature ""
74
68Clone the Git repository for the component to modify 75Clone the Git repository for the component to modify
69---------------------------------------------------- 76----------------------------------------------------
70 77
@@ -483,7 +490,7 @@ typical usage of ``git send-email``::
483 git send-email --to <mailing-list-address> *.patch 490 git send-email --to <mailing-list-address> *.patch
484 491
485Then, review each subject line and list of recipients carefully, and then 492Then, review each subject line and list of recipients carefully, and then
486and then allow the command to send each message. 493allow the command to send each message.
487 494
488You will see that ``git send-email`` will automatically copy the people listed 495You will see that ``git send-email`` will automatically copy the people listed
489in any commit tags such as ``Signed-off-by`` or ``Reported-by``. 496in any commit tags such as ``Signed-off-by`` or ``Reported-by``.
@@ -769,6 +776,38 @@ argument to ``git format-patch`` with a version number::
769 776
770 git format-patch -v2 <ref-branch> 777 git format-patch -v2 <ref-branch>
771 778
779
780After generating updated patches (v2, v3, and so on) via ``git
781format-patch``, ideally developers will add a patch version changelog
782to each patch that describes what has changed between each revision of
783the patch. Add patch version changelogs after the ``---`` marker in the
784patch, indicating that this information is part of this patch, but is not
785suitable for inclusion in the commit message (i.e. the git history) itself.
786Providing a patch version changelog makes it easier for maintainers and
787reviewers to succinctly understand what changed in all versions of the
788patch, without having to consult alternate sources of information, such as
789searching through messages on a mailing list. For example::
790
791 <patch title>
792
793 <commit message>
794
795 <Signed-off-by/other trailers>
796 ---
797 changes in v4:
798 - provide a clearer commit message
799 - fix spelling mistakes
800
801 changes in v3:
802 - replace func() to use other_func() instead
803
804 changes in v2:
805 - this patch was added in v2
806 ---
807 <diffstat output>
808
809 <unified diff>
810
772Lastly please ensure that you also test your revised changes. In particular 811Lastly please ensure that you also test your revised changes. In particular
773please don't just edit the patch file written out by ``git format-patch`` and 812please don't just edit the patch file written out by ``git format-patch`` and
774resend it. 813resend it.
@@ -825,3 +864,52 @@ Other layers may have similar testing branches but there is no formal
825requirement or standard for these so please check the documentation for the 864requirement or standard for these so please check the documentation for the
826layers you are contributing to. 865layers you are contributing to.
827 866
867Acceptance of AI Generated Code
868===============================
869
870The Yocto Project and OpenEmbedded follow the guidance of the Linux Foundation
871in regards to the use of generative AI tools. See:
872https://www.linuxfoundation.org/legal/generative-ai.
873
874All of the existing guidelines in this document are expected to be followed,
875including in the :doc:`recipe-style-guide`, and contributing the changes with
876additional requirements to the items in section
877:ref:`contributor-guide/submit-changes:Implement and commit changes`.
878
879All AI Generated Code must be labeled as such in the commit message,
880prior to your ``Signed-off-by`` line. It is also strongly recommended,
881that any patches or code within the commit also have a comment or other
882indication that this code was AI generated.
883
884For example, here is a properly formatted commit message::
885
886 component: Add the ability to ...
887
888 AI-Generated: Uses GitHub Copilot
889
890 Signed-off-by: Your Name <your.name@domain>
891
892The ``Signed-off-by`` line must be written by you, and not the AI helper.
893As a reminder, when contributing a change, your ``Signed-off-by`` line is
894required and the stipulations in the `Developer's Statement of Origin
8951.1 <https://developercertificate.org/>`__ still apply.
896
897Additionally, you must stipulate AI contributions conform to the Linux
898Foundation policy, specifically:
899
900#. Contributors should ensure that the terms and conditions of the generative AI
901 tool do not place any contractual restrictions on how the tool's output can
902 be used that are inconsistent with the project's open source software
903 license, the project's intellectual property policies, or the Open Source
904 Definition.
905
906#. If any pre-existing copyrighted materials (including pre-existing open
907 source code) authored or owned by third parties are included in the AI tool's
908 output, prior to contributing such output to the project, the Contributor
909 should confirm that they have permission from the third party
910 owners -- such as the form of an open source license or public domain
911 declaration that complies with the project's licensing policies -- to use and
912 modify such pre-existing materials and contribute them to the project.
913 Additionally, the contributor should provide notice and attribution of such
914 third party rights, along with information about the applicable license
915 terms, with their contribution.