contributing guide: document the new [backport] convention
This commit is contained in:
parent
1dd1d66f16
commit
b138e89772
1 changed files with 12 additions and 5 deletions
|
|
@ -334,7 +334,14 @@ The Git stuff
|
||||||
General commit rules
|
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.
|
subject of the commit.
|
||||||
|
|
||||||
If you change something unrelated to the subject parts of the file, because
|
If you change something unrelated to the subject parts of the file, because
|
||||||
|
|
@ -344,7 +351,7 @@ General commit rules
|
||||||
*Tip:* Never commit everything as is using ``git commit -a``, but review
|
*Tip:* Never commit everything as is using ``git commit -a``, but review
|
||||||
carefully your changes with ``git add -p``.
|
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``
|
Always check your changes for whitespace errors using ``git diff --check``
|
||||||
or add following ``pre-commit`` hook:
|
or add following ``pre-commit`` hook:
|
||||||
|
|
@ -354,7 +361,7 @@ General commit rules
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
git diff --check --cached || exit $?
|
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``
|
Example Commit messages: ``Fixes #123; refs #124``
|
||||||
|
|
||||||
|
|
@ -362,7 +369,7 @@ General commit rules
|
||||||
close it when the PR is committed), wheres issue ``#124`` is referenced
|
close it when the PR is committed), wheres issue ``#124`` is referenced
|
||||||
(eg: partially fixed) and won't close the issue when committed.
|
(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)
|
merge can happen)
|
||||||
|
|
||||||
eg: use ``git pull --rebase origin devel``. This is to avoid messing up
|
eg: use ``git pull --rebase origin devel``. This is to avoid messing up
|
||||||
|
|
@ -372,7 +379,7 @@ General commit rules
|
||||||
https://github.com/nim-lang/Nim/pull/9356
|
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
|
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).
|
separate commits (and the merge on github should not squash these into 1).
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue