All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Kerr <jk@codeconstruct.com.au>
To: "Kernel.org Tools" <tools@kernel.org>
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Subject: [PATCH b4 v2] config: add send-me-too configuration
Date: Wed, 10 Jun 2026 10:52:44 +0800	[thread overview]
Message-ID: <20260610-master-v2-1-9913cfb7bb3e@codeconstruct.com.au> (raw)

My mail transport automatically saves a copy of outgoing patches, so I'm
always using the `--no-me-too` argument to `b4 send`.

Instead of having to specify this every time, add a configuration option
to control the send-to-myself setting. In order to avoid
double-negatives in configuration (ie., `send-not-me-too = no`), use an
affirmative version, `send-me-too`, which defaults to `yes` (the current
behaviour).

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
---
Changes in v2:
- address feedback from Konstantin:
  - fix markup for fixed-width formatting (` -> ``)
  - reflow rst to 72 cols
  - explicitly str() our config.get() result, and provide a default.
- Link to v1: https://patch.msgid.link/20260429-master-v1-1-f5052d8b7f9b@codeconstruct.com.au
---
 docs/config.rst           | 6 ++++++
 docs/contributor/send.rst | 4 +++-
 src/b4/__init__.py        | 2 ++
 src/b4/ez.py              | 3 ++-
 4 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/docs/config.rst b/docs/config.rst
index 2490f54..7251786 100644
--- a/docs/config.rst
+++ b/docs/config.rst
@@ -725,6 +725,12 @@ Contributor-oriented settings
 
      Default: ``no``
 
+   :term:`b4.send-me-too`
+     Instructs b4 to include your own address when sending. Set by default,
+     use ``no`` to suppress sending to yourself.
+
+     Default: ``yes``
+
    :term:`b4.send-prefixes`
      Extra prefixes to add to ``[PATCH]`` (e.g. ``RFC mydrv``).
 
diff --git a/docs/contributor/send.rst b/docs/contributor/send.rst
index ba18ef5..da8d701 100644
--- a/docs/contributor/send.rst
+++ b/docs/contributor/send.rst
@@ -321,7 +321,9 @@ Command line flags
   :ref:`contributor_settings`).
 
 ``--not-me-too``
-  Removes your own email address from the recipients.
+  Removes your own email address from the recipients. This can be set in
+  the configuration using the :term:`b4.send-me-too`, setting to ``no``.
+  (see :ref:`contributor_settings`).
 
 ``--no-sign``
   Don't sign your patches with your configured attestation mechanism.
diff --git a/src/b4/__init__.py b/src/b4/__init__.py
index 0530fec..fae5de6 100644
--- a/src/b4/__init__.py
+++ b/src/b4/__init__.py
@@ -177,6 +177,8 @@ DEFAULT_CONFIG: ConfigDictT = {
     'review-target-branch': None,
     # Do not patatt-sign outgoing review emails
     'review-no-patatt-sign': None,
+    # Send to myself
+    'send-me-too': 'yes',
 }
 
 # This is where we store actual config
diff --git a/src/b4/ez.py b/src/b4/ez.py
index d1e2fba..06104b6 100644
--- a/src/b4/ez.py
+++ b/src/b4/ez.py
@@ -2253,7 +2253,8 @@ def cmd_send(cmdargs: argparse.Namespace) -> None:
                 ccdests.append(btr.addr)
 
         excludes = b4.get_excluded_addrs()
-        if cmdargs.not_me_too:
+        conf_me_too = str(config.get('send-me-too', 'yes')).lower()
+        if cmdargs.not_me_too or conf_me_too in {'no', 'n', 'false'}:
             excludes.add(myemail)
 
     tos = set()

---
base-commit: 747e1e89d289188fc5f5815f144a3a66f7ffa362
change-id: 20260429-master-846cbbaed205

Best regards,
--  
Jeremy Kerr <jk@codeconstruct.com.au>


             reply	other threads:[~2026-06-10  2:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-10  2:52 Jeremy Kerr [this message]
2026-06-10 13:28 ` [PATCH b4 v2] config: add send-me-too configuration Konstantin Ryabitsev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260610-master-v2-1-9913cfb7bb3e@codeconstruct.com.au \
    --to=jk@codeconstruct.com.au \
    --cc=konstantin@linuxfoundation.org \
    --cc=tools@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.