diff options
Diffstat (limited to 'documentation/contributor-guide/submit-changes.rst')
-rw-r--r-- | documentation/contributor-guide/submit-changes.rst | 90 |
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 | ||
68 | By default, Git adds a signature line at the end of patches containing the Git | ||
69 | version. We suggest to remove it as it doesn't add useful information. | ||
70 | |||
71 | Remove it with the following command:: | ||
72 | |||
73 | git config --global format.signature "" | ||
74 | |||
68 | Clone the Git repository for the component to modify | 75 | Clone 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 | ||
485 | Then, review each subject line and list of recipients carefully, and then | 492 | Then, review each subject line and list of recipients carefully, and then |
486 | and then allow the command to send each message. | 493 | allow the command to send each message. |
487 | 494 | ||
488 | You will see that ``git send-email`` will automatically copy the people listed | 495 | You will see that ``git send-email`` will automatically copy the people listed |
489 | in any commit tags such as ``Signed-off-by`` or ``Reported-by``. | 496 | in 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 | |||
780 | After generating updated patches (v2, v3, and so on) via ``git | ||
781 | format-patch``, ideally developers will add a patch version changelog | ||
782 | to each patch that describes what has changed between each revision of | ||
783 | the patch. Add patch version changelogs after the ``---`` marker in the | ||
784 | patch, indicating that this information is part of this patch, but is not | ||
785 | suitable for inclusion in the commit message (i.e. the git history) itself. | ||
786 | Providing a patch version changelog makes it easier for maintainers and | ||
787 | reviewers to succinctly understand what changed in all versions of the | ||
788 | patch, without having to consult alternate sources of information, such as | ||
789 | searching 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 | |||
772 | Lastly please ensure that you also test your revised changes. In particular | 811 | Lastly please ensure that you also test your revised changes. In particular |
773 | please don't just edit the patch file written out by ``git format-patch`` and | 812 | please don't just edit the patch file written out by ``git format-patch`` and |
774 | resend it. | 813 | resend it. |
@@ -825,3 +864,52 @@ Other layers may have similar testing branches but there is no formal | |||
825 | requirement or standard for these so please check the documentation for the | 864 | requirement or standard for these so please check the documentation for the |
826 | layers you are contributing to. | 865 | layers you are contributing to. |
827 | 866 | ||
867 | Acceptance of AI Generated Code | ||
868 | =============================== | ||
869 | |||
870 | The Yocto Project and OpenEmbedded follow the guidance of the Linux Foundation | ||
871 | in regards to the use of generative AI tools. See: | ||
872 | https://www.linuxfoundation.org/legal/generative-ai. | ||
873 | |||
874 | All of the existing guidelines in this document are expected to be followed, | ||
875 | including in the :doc:`recipe-style-guide`, and contributing the changes with | ||
876 | additional requirements to the items in section | ||
877 | :ref:`contributor-guide/submit-changes:Implement and commit changes`. | ||
878 | |||
879 | All AI Generated Code must be labeled as such in the commit message, | ||
880 | prior to your ``Signed-off-by`` line. It is also strongly recommended, | ||
881 | that any patches or code within the commit also have a comment or other | ||
882 | indication that this code was AI generated. | ||
883 | |||
884 | For 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 | |||
892 | The ``Signed-off-by`` line must be written by you, and not the AI helper. | ||
893 | As a reminder, when contributing a change, your ``Signed-off-by`` line is | ||
894 | required and the stipulations in the `Developer's Statement of Origin | ||
895 | 1.1 <https://developercertificate.org/>`__ still apply. | ||
896 | |||
897 | Additionally, you must stipulate AI contributions conform to the Linux | ||
898 | Foundation 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. | ||