From 92c5da1b25868f7de6aa3fd56586968e49a470aa Mon Sep 17 00:00:00 2001 From: Daniel Rainer Date: Mon, 15 Dec 2025 15:31:30 +0100 Subject: [PATCH] contributing: add section about commit history Adding this info here should hopefully reduce the number of instances where we need to tell new contributors about it in pull requests. Closes #12162 --- CONTRIBUTING.rst | 17 +++++++++++++++++ share/completions/help.fish | 2 ++ share/help_sections | 1 + 3 files changed, 20 insertions(+) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 7f4c58403..fc1859c41 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -52,6 +52,23 @@ In short: - Be conservative in what you need (keep to the agreed minimum supported Rust version, limit new dependencies) - Use automated tools to help you (``build_tools/check.sh``) +Commit History +============== + +We use a linear, `recipe-style `__ history. +Every commit should pass our checks. +We do not want "fixup" commits in our history. +If you notice an issue with a commit in a pull request, or get feedback suggesting changes, +you should rewrite the commit history and fix the relevant commits directly, +instead of adding new "fixup" commits. +When a pull request is ready, we rebase it on top of the current master branch, +so don't be shy about rewriting the history of commits which are not on master yet. +Rebasing (not merging) your pull request on the latest version of master is also welcome, especially if it resolves conflicts. + +If you're using Git, consider using `jj `__ to make this easier. + +If a commit should close an issue, add a ``Fixes #`` line at the end of the commit description. + Contributing completions ======================== diff --git a/share/completions/help.fish b/share/completions/help.fish index c63ec3ae3..0a553f6df 100644 --- a/share/completions/help.fish +++ b/share/completions/help.fish @@ -39,6 +39,8 @@ function __fish_help_describe -a help_item return case contributing#code-style return + case contributing#commit-history + return case contributing#configuring-your-editor-for-fish-scripts return case contributing#contributing-completions diff --git a/share/help_sections b/share/help_sections index 1b494cbbe..078b1d040 100644 --- a/share/help_sections +++ b/share/help_sections @@ -135,6 +135,7 @@ completions#where-to-put-completions contributing contributing#adding-translations-for-a-new-language contributing#code-style +contributing#commit-history contributing#configuring-your-editor-for-fish-scripts contributing#contributing-completions contributing#contributing-documentation