1bf215546Sopenharmony_ciSubmitting Patches 2bf215546Sopenharmony_ci================== 3bf215546Sopenharmony_ci 4bf215546Sopenharmony_ci.. _guidelines: 5bf215546Sopenharmony_ci 6bf215546Sopenharmony_ciBasic guidelines 7bf215546Sopenharmony_ci---------------- 8bf215546Sopenharmony_ci 9bf215546Sopenharmony_ci- Patches should not mix code changes with code formatting changes 10bf215546Sopenharmony_ci (except, perhaps, in very trivial cases.) 11bf215546Sopenharmony_ci- Code patches should follow Mesa :doc:`coding 12bf215546Sopenharmony_ci conventions <codingstyle>`. 13bf215546Sopenharmony_ci- Whenever possible, patches should only affect individual Mesa/Gallium 14bf215546Sopenharmony_ci components. 15bf215546Sopenharmony_ci- Patches should never introduce build breaks and should be bisectable 16bf215546Sopenharmony_ci (see ``Git bisect``.) 17bf215546Sopenharmony_ci- Patches should be properly :ref:`formatted <formatting>`. 18bf215546Sopenharmony_ci- Patches should be sufficiently :ref:`tested <testing>` before 19bf215546Sopenharmony_ci submitting. 20bf215546Sopenharmony_ci- Patches should be :ref:`submitted <submit>` via a merge request for 21bf215546Sopenharmony_ci :ref:`review <reviewing>`. 22bf215546Sopenharmony_ci 23bf215546Sopenharmony_ci.. _formatting: 24bf215546Sopenharmony_ci 25bf215546Sopenharmony_ciPatch formatting 26bf215546Sopenharmony_ci---------------- 27bf215546Sopenharmony_ci 28bf215546Sopenharmony_ci- Lines should be limited to 75 characters or less so that Git logs 29bf215546Sopenharmony_ci displayed in 80-column terminals avoid line wrapping. Note that 30bf215546Sopenharmony_ci ``git log`` uses 4 spaces of indentation (4 + 75 < 80). 31bf215546Sopenharmony_ci- The first line should be a short, concise summary of the change 32bf215546Sopenharmony_ci prefixed with a module name. Examples: 33bf215546Sopenharmony_ci 34bf215546Sopenharmony_ci :: 35bf215546Sopenharmony_ci 36bf215546Sopenharmony_ci mesa: Add support for querying GL_VERTEX_ATTRIB_ARRAY_LONG 37bf215546Sopenharmony_ci 38bf215546Sopenharmony_ci gallium: add PIPE_CAP_DEVICE_RESET_STATUS_QUERY 39bf215546Sopenharmony_ci 40bf215546Sopenharmony_ci i965: Fix missing type in local variable declaration. 41bf215546Sopenharmony_ci 42bf215546Sopenharmony_ci- Subsequent patch comments should describe the change in more detail, 43bf215546Sopenharmony_ci if needed. For example: 44bf215546Sopenharmony_ci 45bf215546Sopenharmony_ci :: 46bf215546Sopenharmony_ci 47bf215546Sopenharmony_ci i965: Remove end-of-thread SEND alignment code. 48bf215546Sopenharmony_ci 49bf215546Sopenharmony_ci This was present in Eric's initial implementation of the compaction code 50bf215546Sopenharmony_ci for Sandybridge (commit 077d01b6). There is no documentation saying this 51bf215546Sopenharmony_ci is necessary, and removing it causes no regressions in piglit on any 52bf215546Sopenharmony_ci platform. 53bf215546Sopenharmony_ci 54bf215546Sopenharmony_ci- A "Signed-off-by:" line is not required, but not discouraged either. 55bf215546Sopenharmony_ci- If a patch addresses an issue in GitLab, use the Closes: tag For 56bf215546Sopenharmony_ci example: 57bf215546Sopenharmony_ci 58bf215546Sopenharmony_ci :: 59bf215546Sopenharmony_ci 60bf215546Sopenharmony_ci Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1 61bf215546Sopenharmony_ci 62bf215546Sopenharmony_ci Prefer the full URL to just ``Closes: #1``, since the URL makes it 63bf215546Sopenharmony_ci easier to get to the bug page from ``git log`` 64bf215546Sopenharmony_ci 65bf215546Sopenharmony_ci **Do not use the ``Fixes:`` tag for this!** Mesa already uses 66bf215546Sopenharmony_ci ``Fixes:`` for something else. 67bf215546Sopenharmony_ci See :ref:`below <fixes>`. 68bf215546Sopenharmony_ci 69bf215546Sopenharmony_ci- If there have been several revisions to a patch during the review 70bf215546Sopenharmony_ci process, they should be noted such as in this example: 71bf215546Sopenharmony_ci 72bf215546Sopenharmony_ci :: 73bf215546Sopenharmony_ci 74bf215546Sopenharmony_ci st/mesa: add ARB_texture_stencil8 support (v4) 75bf215546Sopenharmony_ci 76bf215546Sopenharmony_ci if we support stencil texturing, enable texture_stencil8 77bf215546Sopenharmony_ci there is no requirement to support native S8 for this, 78bf215546Sopenharmony_ci the texture can be converted to x24s8 fine. 79bf215546Sopenharmony_ci 80bf215546Sopenharmony_ci v2: fold fixes from Marek in: 81bf215546Sopenharmony_ci a) put S8 last in the list 82bf215546Sopenharmony_ci b) fix renderable to always test for d/s renderable 83bf215546Sopenharmony_ci fixup the texture case to use a stencil only format 84bf215546Sopenharmony_ci for picking the format for the texture view. 85bf215546Sopenharmony_ci v3: hit fallback for getteximage 86bf215546Sopenharmony_ci v4: put s8 back in front, it shouldn't get picked now (Ilia) 87bf215546Sopenharmony_ci 88bf215546Sopenharmony_ci- If someone tested your patch, document it with a line like this: 89bf215546Sopenharmony_ci 90bf215546Sopenharmony_ci :: 91bf215546Sopenharmony_ci 92bf215546Sopenharmony_ci Tested-by: Joe Hacker <jhacker@foo.com> 93bf215546Sopenharmony_ci 94bf215546Sopenharmony_ci- If the patch was reviewed (usually the case) or acked by someone, 95bf215546Sopenharmony_ci that should be documented with: 96bf215546Sopenharmony_ci 97bf215546Sopenharmony_ci :: 98bf215546Sopenharmony_ci 99bf215546Sopenharmony_ci Reviewed-by: Joe Hacker <jhacker@foo.com> 100bf215546Sopenharmony_ci Acked-by: Joe Hacker <jhacker@foo.com> 101bf215546Sopenharmony_ci 102bf215546Sopenharmony_ci- When updating a merge request add all the tags (``Acked-by:``, ``Reviewed-by:``, 103bf215546Sopenharmony_ci ``Fixes:``, ``Cc: mesa-stable`` and/or other) to the commit messages. 104bf215546Sopenharmony_ci This provides reviewers with quick feedback if the patch has already 105bf215546Sopenharmony_ci been reviewed. 106bf215546Sopenharmony_ci 107bf215546Sopenharmony_ci.. _fixes: 108bf215546Sopenharmony_ci 109bf215546Sopenharmony_ciThe ``Fixes:`` tag 110bf215546Sopenharmony_ci------------------ 111bf215546Sopenharmony_ci 112bf215546Sopenharmony_ciIf a patch addresses a issue introduced with earlier commit, that 113bf215546Sopenharmony_cishould be noted in the commit message. For example:: 114bf215546Sopenharmony_ci 115bf215546Sopenharmony_ci Fixes: d7b3707c612 ("util/disk_cache: use stat() to check if entry is a directory") 116bf215546Sopenharmony_ci 117bf215546Sopenharmony_ciYou can produce those fixes lines by running this command once:: 118bf215546Sopenharmony_ci 119bf215546Sopenharmony_ci git config --global alias.fixes "show -s --pretty='format:Fixes: %h (\"%s\")'" 120bf215546Sopenharmony_ci 121bf215546Sopenharmony_ciAfter that, using ``git fixes <sha1>`` will print the full line for you. 122bf215546Sopenharmony_ci 123bf215546Sopenharmony_ciThe stable tag 124bf215546Sopenharmony_ci~~~~~~~~~~~~~~ 125bf215546Sopenharmony_ci 126bf215546Sopenharmony_ciIf you want a commit to be applied to a stable branch, you should add an 127bf215546Sopenharmony_ciappropriate note to the commit message. 128bf215546Sopenharmony_ci 129bf215546Sopenharmony_ciUsing a ``Fixes:`` tag as described in :ref:`Patch formatting <formatting>` 130bf215546Sopenharmony_ciis the preferred way to nominate a commit that should be backported. 131bf215546Sopenharmony_ciThere are scripts that will figure out which releases to apply the patch 132bf215546Sopenharmony_cito automatically, so you don't need to figure it out. 133bf215546Sopenharmony_ci 134bf215546Sopenharmony_ciAlternatively, you may use a "CC:" tag. Here are some examples of such a 135bf215546Sopenharmony_cinote:: 136bf215546Sopenharmony_ci 137bf215546Sopenharmony_ci Cc: mesa-stable 138bf215546Sopenharmony_ci Cc: 20.0 <mesa-stable> 139bf215546Sopenharmony_ci CC: 20.0 19.3 <mesa-stable> 140bf215546Sopenharmony_ci 141bf215546Sopenharmony_ciUsing the CC tag **should** include the stable branches you want to 142bf215546Sopenharmony_cinominate the patch to. If you do not provide any version it is nominated 143bf215546Sopenharmony_cito all active stable branches. 144bf215546Sopenharmony_ci 145bf215546Sopenharmony_ci.. _testing: 146bf215546Sopenharmony_ci 147bf215546Sopenharmony_ciTesting Patches 148bf215546Sopenharmony_ci--------------- 149bf215546Sopenharmony_ci 150bf215546Sopenharmony_ciIt should go without saying that patches must be tested. In general, do 151bf215546Sopenharmony_ciwhatever testing is prudent. 152bf215546Sopenharmony_ci 153bf215546Sopenharmony_ciYou should always run the Mesa test suite before submitting patches. The 154bf215546Sopenharmony_citest suite can be run using the 'meson test' command. All tests must 155bf215546Sopenharmony_cipass before patches will be accepted, this may mean you have to update 156bf215546Sopenharmony_cithe tests themselves. 157bf215546Sopenharmony_ci 158bf215546Sopenharmony_ciWhenever possible and applicable, test the patch with 159bf215546Sopenharmony_ci`Piglit <https://piglit.freedesktop.org>`__ and/or 160bf215546Sopenharmony_ci`dEQP <https://android.googlesource.com/platform/external/deqp/>`__ to 161bf215546Sopenharmony_cicheck for regressions. 162bf215546Sopenharmony_ci 163bf215546Sopenharmony_ciAs mentioned at the beginning, patches should be bisectable. A good way 164bf215546Sopenharmony_cito test this is to make use of the \`git rebase\` command, to run your 165bf215546Sopenharmony_citests on each commit. Assuming your branch is based off 166bf215546Sopenharmony_ci``origin/main``, you can run: 167bf215546Sopenharmony_ci 168bf215546Sopenharmony_ci.. code-block:: console 169bf215546Sopenharmony_ci 170bf215546Sopenharmony_ci $ git rebase --interactive --exec "meson test -C build/" origin/main 171bf215546Sopenharmony_ci 172bf215546Sopenharmony_cireplacing ``"meson test"`` with whatever other test you want to run. 173bf215546Sopenharmony_ci 174bf215546Sopenharmony_ci.. _submit: 175bf215546Sopenharmony_ci 176bf215546Sopenharmony_ciSubmitting Patches 177bf215546Sopenharmony_ci------------------ 178bf215546Sopenharmony_ci 179bf215546Sopenharmony_ciPatches are submitted to the Mesa project via a 180bf215546Sopenharmony_ci`GitLab <https://gitlab.freedesktop.org/mesa/mesa>`__ Merge Request. 181bf215546Sopenharmony_ci 182bf215546Sopenharmony_ciAdd labels to your MR to help reviewers find it. For example: 183bf215546Sopenharmony_ci 184bf215546Sopenharmony_ci- Mesa changes affecting all drivers: mesa 185bf215546Sopenharmony_ci- Hardware vendor specific code: amd, intel, nvidia, ... 186bf215546Sopenharmony_ci- Driver specific code: anvil, freedreno, i965, iris, radeonsi, radv, 187bf215546Sopenharmony_ci vc4, ... 188bf215546Sopenharmony_ci- Other tag examples: gallium, util 189bf215546Sopenharmony_ci 190bf215546Sopenharmony_ciTick the following when creating the MR. It allows developers to rebase 191bf215546Sopenharmony_ciyour work on top of main. 192bf215546Sopenharmony_ci 193bf215546Sopenharmony_ci:: 194bf215546Sopenharmony_ci 195bf215546Sopenharmony_ci Allow commits from members who can merge to the target branch 196bf215546Sopenharmony_ci 197bf215546Sopenharmony_ciIf you revise your patches based on code review and push an update to 198bf215546Sopenharmony_ciyour branch, you should maintain a **clean** history in your patches. 199bf215546Sopenharmony_ciThere should not be "fixup" patches in the history. The series should be 200bf215546Sopenharmony_cibuildable and functional after every commit whenever you push the 201bf215546Sopenharmony_cibranch. 202bf215546Sopenharmony_ci 203bf215546Sopenharmony_ciIt is your responsibility to keep the MR alive and making progress, as 204bf215546Sopenharmony_cithere are no guarantees that a Mesa dev will independently take interest 205bf215546Sopenharmony_ciin it. 206bf215546Sopenharmony_ci 207bf215546Sopenharmony_ciSome other notes: 208bf215546Sopenharmony_ci 209bf215546Sopenharmony_ci- Make changes and update your branch based on feedback 210bf215546Sopenharmony_ci- After an update, for the feedback you handled, close the feedback 211bf215546Sopenharmony_ci discussion with the "Resolve Discussion" button. This way the 212bf215546Sopenharmony_ci reviewers know which feedback got handled and which didn't. 213bf215546Sopenharmony_ci- Old, stale MR may be closed, but you can reopen it if you still want 214bf215546Sopenharmony_ci to pursue the changes 215bf215546Sopenharmony_ci- You should periodically check to see if your MR needs to be rebased 216bf215546Sopenharmony_ci- Make sure your MR is closed if your patches get pushed outside of 217bf215546Sopenharmony_ci GitLab 218bf215546Sopenharmony_ci- Please send MRs from a personal fork rather than from the main Mesa 219bf215546Sopenharmony_ci repository, as it clutters it unnecessarily. 220bf215546Sopenharmony_ci 221bf215546Sopenharmony_ci.. _reviewing: 222bf215546Sopenharmony_ci 223bf215546Sopenharmony_ciReviewing Patches 224bf215546Sopenharmony_ci----------------- 225bf215546Sopenharmony_ci 226bf215546Sopenharmony_ciTo participate in code review, you can monitor the GitLab Mesa `Merge 227bf215546Sopenharmony_ciRequests <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests>`__ 228bf215546Sopenharmony_cipage, and/or register for notifications in your GitLab settings. 229bf215546Sopenharmony_ci 230bf215546Sopenharmony_ciWhen you've reviewed a patch, please be unambiguous about your review. 231bf215546Sopenharmony_ciThat is, state either 232bf215546Sopenharmony_ci 233bf215546Sopenharmony_ci:: 234bf215546Sopenharmony_ci 235bf215546Sopenharmony_ci Reviewed-by: Joe Hacker <jhacker@foo.com> 236bf215546Sopenharmony_ci 237bf215546Sopenharmony_cior 238bf215546Sopenharmony_ci 239bf215546Sopenharmony_ci:: 240bf215546Sopenharmony_ci 241bf215546Sopenharmony_ci Acked-by: Joe Hacker <jhacker@foo.com> 242bf215546Sopenharmony_ci 243bf215546Sopenharmony_ciRather than saying just "LGTM" or "Seems OK". 244bf215546Sopenharmony_ci 245bf215546Sopenharmony_ciIf small changes are suggested, it's OK to say something like: 246bf215546Sopenharmony_ci 247bf215546Sopenharmony_ci:: 248bf215546Sopenharmony_ci 249bf215546Sopenharmony_ci With the above fixes, Reviewed-by: Joe Hacker <jhacker@foo.com> 250bf215546Sopenharmony_ci 251bf215546Sopenharmony_ciwhich tells the patch author that the patch can be committed, as long as 252bf215546Sopenharmony_cithe issues are resolved first. 253bf215546Sopenharmony_ci 254bf215546Sopenharmony_ciThese Reviewed-by, Acked-by, and Tested-by tags should also be amended 255bf215546Sopenharmony_ciinto commits in a MR before it is merged. 256bf215546Sopenharmony_ci 257bf215546Sopenharmony_ciWhen providing a Reviewed-by, Acked-by, or Tested-by tag in a GitLab MR, 258bf215546Sopenharmony_cienclose the tag in backticks: 259bf215546Sopenharmony_ci 260bf215546Sopenharmony_ci:: 261bf215546Sopenharmony_ci 262bf215546Sopenharmony_ci `Reviewed-by: Joe Hacker <jhacker@example.com>` 263bf215546Sopenharmony_ci 264bf215546Sopenharmony_ciThis is the markdown format for literal, and will prevent GitLab from 265bf215546Sopenharmony_cihiding the < and > symbols. 266bf215546Sopenharmony_ci 267bf215546Sopenharmony_ciReview by non-experts is encouraged. Understanding how someone else goes 268bf215546Sopenharmony_ciabout solving a problem is a great way to learn your way around the 269bf215546Sopenharmony_ciproject. The submitter is expected to evaluate whether they have an 270bf215546Sopenharmony_ciappropriate amount of review feedback from people who also understand 271bf215546Sopenharmony_cithe code before merging their patches. 272bf215546Sopenharmony_ci 273bf215546Sopenharmony_ciNominating a commit for a stable branch 274bf215546Sopenharmony_ci--------------------------------------- 275bf215546Sopenharmony_ci 276bf215546Sopenharmony_ciThere are several ways to nominate a patch for inclusion in the stable 277bf215546Sopenharmony_cibranch and release. In order or preference: 278bf215546Sopenharmony_ci 279bf215546Sopenharmony_ci- By adding the ``Fixes:`` tag in the commit message as described above, if you are fixing 280bf215546Sopenharmony_ci a specific commit. 281bf215546Sopenharmony_ci- By adding the ``Cc: mesa-stable`` tag in the commit message as described above. 282bf215546Sopenharmony_ci- By submitting a merge request against the ``staging/year.quarter`` 283bf215546Sopenharmony_ci branch on GitLab. Refer to the :ref:`instructions below <backports>`. 284bf215546Sopenharmony_ci 285bf215546Sopenharmony_ciPlease **DO NOT** send patches to mesa-stable@lists.freedesktop.org, it 286bf215546Sopenharmony_ciis not monitored actively and is a historical artifact. 287bf215546Sopenharmony_ci 288bf215546Sopenharmony_ciIf you are not the author of the original patch, please Cc: them in your 289bf215546Sopenharmony_cinomination request. 290bf215546Sopenharmony_ci 291bf215546Sopenharmony_ciThe current patch status can be observed in the :ref:`staging 292bf215546Sopenharmony_cibranch <stagingbranch>`. 293bf215546Sopenharmony_ci 294bf215546Sopenharmony_ci.. _criteria: 295bf215546Sopenharmony_ci 296bf215546Sopenharmony_ciCriteria for accepting patches to the stable branch 297bf215546Sopenharmony_ci--------------------------------------------------- 298bf215546Sopenharmony_ci 299bf215546Sopenharmony_ciMesa has a designated release manager for each stable branch, and the 300bf215546Sopenharmony_cirelease manager is the only developer that should be pushing changes to 301bf215546Sopenharmony_cithese branches. Everyone else should nominate patches using the 302bf215546Sopenharmony_cimechanism described above. The following rules define which patches are 303bf215546Sopenharmony_ciaccepted and which are not. The stable-release manager is also given 304bf215546Sopenharmony_cibroad discretion in rejecting patches that have been nominated. 305bf215546Sopenharmony_ci 306bf215546Sopenharmony_ci- Patch must conform with the :ref:`Basic guidelines <guidelines>` 307bf215546Sopenharmony_ci- Patch must have landed in main first. In case where the original 308bf215546Sopenharmony_ci patch is too large and/or otherwise contradicts with the rules set 309bf215546Sopenharmony_ci within, a backport is appropriate. 310bf215546Sopenharmony_ci- It must not introduce a regression - be that build or runtime wise. 311bf215546Sopenharmony_ci 312bf215546Sopenharmony_ci .. note:: 313bf215546Sopenharmony_ci If the regression is due to faulty piglit/dEQP/CTS/other test 314bf215546Sopenharmony_ci the latter must be fixed first. A reference to the offending test(s) 315bf215546Sopenharmony_ci and respective fix(es) should be provided in the nominated patch. 316bf215546Sopenharmony_ci 317bf215546Sopenharmony_ci- Patch cannot be larger than 100 lines. 318bf215546Sopenharmony_ci- Patches that move code around with no functional change should be 319bf215546Sopenharmony_ci rejected. 320bf215546Sopenharmony_ci- Patch must be a bug fix and not a new feature. 321bf215546Sopenharmony_ci 322bf215546Sopenharmony_ci .. note:: 323bf215546Sopenharmony_ci An exception to this rule, are hardware-enabling "features". For 324bf215546Sopenharmony_ci example, :ref:`backports <backports>` of new code to support a 325bf215546Sopenharmony_ci newly-developed hardware product can be accepted if they can be 326bf215546Sopenharmony_ci reasonably determined not to have effects on other hardware. 327bf215546Sopenharmony_ci 328bf215546Sopenharmony_ci- Patch must be reviewed, For example, the commit message has 329bf215546Sopenharmony_ci Reviewed-by, Signed-off-by, or Tested-by tags from someone but the 330bf215546Sopenharmony_ci author. 331bf215546Sopenharmony_ci- Performance patches are considered only if they provide information 332bf215546Sopenharmony_ci about the hardware, program in question and observed improvement. Use 333bf215546Sopenharmony_ci numbers to represent your measurements. 334bf215546Sopenharmony_ci 335bf215546Sopenharmony_ciIf the patch complies with the rules it will be 336bf215546Sopenharmony_ci:ref:`cherry-picked <pickntest>`. Alternatively the release 337bf215546Sopenharmony_cimanager will reply to the patch in question stating why the patch has 338bf215546Sopenharmony_cibeen rejected or would request a backport. The stable-release manager 339bf215546Sopenharmony_cimay at times need to force-push changes to the stable branches, for 340bf215546Sopenharmony_ciexample, to drop a previously-picked patch that was later identified as 341bf215546Sopenharmony_cicausing a regression). These force-pushes may cause changes to be lost 342bf215546Sopenharmony_cifrom the stable branch if developers push things directly. Consider 343bf215546Sopenharmony_ciyourself warned. 344bf215546Sopenharmony_ci 345bf215546Sopenharmony_ci.. _backports: 346bf215546Sopenharmony_ci 347bf215546Sopenharmony_ciSending backports for the stable branch 348bf215546Sopenharmony_ci--------------------------------------- 349bf215546Sopenharmony_ci 350bf215546Sopenharmony_ciBy default merge conflicts are resolved by the stable-release manager. 351bf215546Sopenharmony_ciThe release maintainer should resolve trivial conflicts, but for complex 352bf215546Sopenharmony_ciconflicts they should ask the original author to provide a backport or 353bf215546Sopenharmony_cide-nominate the patch. 354bf215546Sopenharmony_ci 355bf215546Sopenharmony_ciFor patches that either need to be nominated after they've landed in 356bf215546Sopenharmony_cimain, or that are known ahead of time to not not apply cleanly to a 357bf215546Sopenharmony_cistable branch (such as due to a rename), using a GitLab MR is most 358bf215546Sopenharmony_ciappropriate. The MR should be based on and target the 359bf215546Sopenharmony_ci``staging/**year.quarter**`` branch, not on the ``year.quarter`` branch, 360bf215546Sopenharmony_ciper the stable branch policy. Assigning the MR to release maintainer for 361bf215546Sopenharmony_cisaid branch or mentioning them is helpful, but not required. 362bf215546Sopenharmony_ci 363bf215546Sopenharmony_ciMake sure to use ``git cherry-pick -x`` when cherry-picking the commits 364bf215546Sopenharmony_cifrom the main branch. This adds the "cherry picked from commit ..." line 365bf215546Sopenharmony_cito the commit message, to allow the release maintainters to mark those 366bf215546Sopenharmony_cias backported, which in turn allows the tools to correctly report any 367bf215546Sopenharmony_cifuture ``Fixes:`` affecting the commits you backported. 368bf215546Sopenharmony_ci 369bf215546Sopenharmony_ciDocumentation patches 370bf215546Sopenharmony_ci--------------------- 371bf215546Sopenharmony_ci 372bf215546Sopenharmony_ciOur documentation is written as `reStructuredText`_ files in the 373bf215546Sopenharmony_ci:file:`docs` folder, and built using `Sphinx`_. 374bf215546Sopenharmony_ci 375bf215546Sopenharmony_ciThe preferred language of the documentation is US English. This 376bf215546Sopenharmony_cidoesn't mean that everyone is expected to pay close attention to 377bf215546Sopenharmony_cithe different English variants, but it does mean someone might 378bf215546Sopenharmony_cisuggest a spelling-change, either during review or as a follow-up 379bf215546Sopenharmony_cimerge-request. 380bf215546Sopenharmony_ci 381bf215546Sopenharmony_ci.. _reStructuredText: https://docutils.sourceforge.io/rst.html 382bf215546Sopenharmony_ci.. _Sphinx: https://www.sphinx-doc.org/ 383bf215546Sopenharmony_ci 384bf215546Sopenharmony_ciGit tips 385bf215546Sopenharmony_ci-------- 386bf215546Sopenharmony_ci 387bf215546Sopenharmony_ci- ``git rebase -i ...`` is your friend. Don't be afraid to use it. 388bf215546Sopenharmony_ci- Apply a fixup to commit FOO. 389bf215546Sopenharmony_ci 390bf215546Sopenharmony_ci .. code-block:: console 391bf215546Sopenharmony_ci 392bf215546Sopenharmony_ci git add ... 393bf215546Sopenharmony_ci git commit --fixup=FOO 394bf215546Sopenharmony_ci git rebase -i --autosquash ... 395bf215546Sopenharmony_ci 396bf215546Sopenharmony_ci- Test for build breakage between patches e.g last 8 commits. 397bf215546Sopenharmony_ci 398bf215546Sopenharmony_ci .. code-block:: console 399bf215546Sopenharmony_ci 400bf215546Sopenharmony_ci git rebase -i --exec="ninja -C build/" HEAD~8 401