diff --git a/doc/contributing.rst b/doc/contributing.rst index e3165c699e..53e846ed94 100644 --- a/doc/contributing.rst +++ b/doc/contributing.rst @@ -281,7 +281,14 @@ The Git stuff General commit rules -------------------- -1. All changes introduced by the commit (diff lines) must be related to the +1. Bugfixes that should be backported to the latest stable release should + contain the string ``[backport]`` in the commit message! There will be an + outmated process relying on these. However, bugfixes also have the inherent + risk of causing regressions which are worse for a "stable, bugfixes-only" + branch, so in doubt, leave out the ``[backport]``. Standard library bugfixes + are less critical than compiler bugfixes. + +2. All changes introduced by the commit (diff lines) must be related to the subject of the commit. If you change some other unrelated to the subject parts of the file, because @@ -291,7 +298,7 @@ General commit rules *Tip:* Never commit everything as is using ``git commit -a``, but review carefully your changes with ``git add -p``. -2. Changes should not introduce any trailing whitespace. +3. Changes should not introduce any trailing whitespace. Always check your changes for whitespace errors using ``git diff --check`` or add following ``pre-commit`` hook: @@ -301,7 +308,7 @@ General commit rules #!/bin/sh git diff --check --cached || exit $? -3. Describe your commit and use your common sense. +4. Describe your commit and use your common sense. Example Commit messages: ``Fixes #123; refs #124`` @@ -309,7 +316,7 @@ General commit rules close it when the PR is committed), wheres issue ``#124`` is referenced (eg: partially fixed) and won't close the issue when committed. -4. Commits should be always be rebased against devel (so a fast forward +5. Commits should be always be rebased against devel (so a fast forward merge can happen) eg: use ``git pull --rebase origin devel``. This is to avoid messing up @@ -319,7 +326,7 @@ General commit rules https://github.com/nim-lang/Nim/pull/9356 -5. Do not mix pure formatting changes (eg whitespace changes, nimpretty) or +6. Do not mix pure formatting changes (eg whitespace changes, nimpretty) or automated changes (eg nimfix) with other code changes: these should be in separate commits (and the merge on github should not squash these into 1).