[v2,2/2] Documentation: contributing: Document the maintainer lookup script
diff mbox series

Message ID CAA_Uwz+vNY9f+B5C-6+sBYks7QY6x9-WBZPDgmujEE3M6fgSAg@mail.gmail.com
State New
Headers show
Series
  • utils: Add a maintainer lookup script
Related show

Commit Message

Ray Strode Oct. 22, 2026, 5:33 p.m. UTC
Patch 2/2 is attached to preserve long lines.


On Thu, 22 Oct 2026 13:33:00 -0400, Ray Strode <halfline@gmail.com> wrote:
> Hi,
>
> Resending with patch attachments to preserve long lines.
>
> This series adds utils/get_maintainer.py to help contributors find
> maintainers and reviewers for their patches, and documents its use in
> the contribution guide.
>
> The script accepts patches or repository paths and uses Git history to
> rank review and acknowledgment credits ahead of authorship. It follows
> the kernel script's input conventions and supports plain recipient
> output for git send-email --cc-cmd.
>
> --Ray
>
> Ray Strode (2):
>   utils: Find maintainers from Git history
>   Documentation: contributing: Document the maintainer lookup script

Patch
diff mbox series

From 44ebaa5a29799eee71c7bb2a00a4ca90d11bb8cd Mon Sep 17 00:00:00 2001
From: Ray Strode <halfline@gmail.com>
Date: Mon, 19 Oct 2026 13:30:27 -0400
Subject: [PATCH v2 2/2] Documentation: contributing: Document the maintainer
 lookup script

From: Ray Strode <rstrode@redhat.com>

This commit documents get_maintainer.py in the patch submission guide. The
guide explains mailing list submission but does not show contributors how
to find maintainers and reviewers for the affected code.

The examples cover path and patch inputs plus recipient output suitable for
git send-email. The text explains the history boundary, time window,
parent-directory fallback, and how review credits determine the results.

Signed-off-by: Ray Strode <rstrode@redhat.com>
---
 Documentation/contributing.rst | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/Documentation/contributing.rst b/Documentation/contributing.rst
index 20682d56..b762bf11 100644
--- a/Documentation/contributing.rst
+++ b/Documentation/contributing.rst
@@ -83,60 +83,85 @@  Documentation
 -------------
 
 Project documentation is created using `Sphinx`_.  Source level documentation
 uses `Doxygen`_.  Please make sure to document all code during development.
 
 .. _Sphinx: https://www.sphinx-doc.org
 .. _Doxygen: https://www.doxygen.nl
 
 Submitting Patches
 ------------------
 
 The libcamera project has high standards of stability, efficiency and
 reliability. To achieve those, the project goes to great length to produce
 code that is as easy to read, understand and maintain as possible. This is
 made possible by a set of :ref:`coding-style-guidelines` that all submissions
 are expected to follow.
 
 We also care about the quality of commit messages. A good commit message not
 only describes what a commit does, but why it does so. By conveying clear
 information about the purpose of the commit, it helps speeding up reviews.
 Regardless of whether you're new to git or have years of experience,
 https://cbea.ms/git-commit/ is always a good guide to read to improve your
 commit message writing skills.
 
 The patch submission process for libcamera is similar to the Linux kernel, and
 goes through the `libcamera-devel`_ mailing list. If you have no previous
 experience with ``git-send-email``, or just experience trouble configuring it
 for your e-mail provider, the sourcehut developers have put together a detailed
 guide available at https://git-send-email.io/.
 
+To find maintainers and reviewers for the code changed by your patch, use
+``utils/get_maintainer.py``. It reads local Git history and accepts patches,
+standard input, or paths with ``-f``, following the Linux kernel utility's
+input conventions::
+
+    utils/get_maintainer.py --git-since=2-years-ago -f src/gstreamer/
+    utils/get_maintainer.py 0001-camera-fix.patch
+
+The output includes roles and review, acknowledgment and authorship counts for
+each contact.
+History ends at the branch's upstream when configured, or ``HEAD`` otherwise;
+``--git-revision`` overrides that choice. The default history window is one
+year, so quiet areas may need a longer window. A path with no recent history
+uses its immediate parent directory, except the repository root. Statistics
+count whole commits that touch the selected paths, including broader refactors.
+
+For use with ``git send-email``, disable the annotations::
+
+    git send-email --cc-cmd='utils/get_maintainer.py --noroles --norolestats' \
+        0001-camera-fix.patch
+
+The utility includes ``libcamera-devel`` by default. Use ``--nol`` if you
+already provide the list with ``--to``. See ``--help`` for the supported subset
+of kernel utility options, including history limits and mailmap support.
+
 Patches submitted to the libcamera project must be certified as suitable for
 integration into an open source project. As such libcamera follows the same
 model as utilised by the Linux kernel, and requires the use of 'Signed-off-by:'
 tags in all patches.
 
 By signing your contributions you are certifying your work in accordance with
 the following:
 
 `Developer's Certificate of Origin`_
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Version 1.1
 
 Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
 1 Letterman Drive
 Suite D4700
 San Francisco, CA, 94129
 
 Everyone is permitted to copy and distribute verbatim copies of this
 license document, but changing it is not allowed.
 
 Developer's Certificate of Origin 1.1
 
 By making a contribution to this project, I certify that:
 
 (a) The contribution was created in whole or in part by me and I
     have the right to submit it under the open source license
     indicated in the file; or
 
 (b) The contribution is based upon previous work that, to the best
-- 
2.56.0