All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH b4 v2] config: add send-me-too configuration
@ 2026-06-10  2:52 Jeremy Kerr
  2026-06-10 13:28 ` Konstantin Ryabitsev
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Kerr @ 2026-06-10  2:52 UTC (permalink / raw)
  To: Kernel.org Tools; +Cc: Konstantin Ryabitsev

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>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-10 13:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10  2:52 [PATCH b4 v2] config: add send-me-too configuration Jeremy Kerr
2026-06-10 13:28 ` Konstantin Ryabitsev

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.