KW-SEND-PATCH(1)

πŸ“¦ version 0.10, in ubuntu stonking

πŸ’Œ kw-send-patch β€” sending patches through mail, but make it cute

okay bestie, so this is the manual page for kw-send-patch, part of kw. It does that thing where your commits go out into the world as actual emails, the way real humans do on mailing lists. Let's get into it. πŸ¦‹


✨ SYNOPSIS ✨

grab your terminal, here's the whole shape of it:

kw send-patch (-s | --send) [--simulate] [--private] [--rfc] [--to='<recipient>,...'] [--cc='<recipient>,...'] [<rev-range>...] [-v<version>] [-- <extra-args>...]
kw send-patch (-t | --setup) [--local | --global] [-f | --force] (<config> <value>)...
kw send-patch (-i | --interactive) [--local | --global]
kw send-patch (-l | --list)
kw send-patch --verify [--local | --global]
kw send-patch --template[=<template>] [-n | --no-interactive] [--local | --global] [-f | --force] [(<config> <value>)...]
kw send-patch --verbose

like, that's a lot of little guys but each one is doing exactly one job, no cap. πŸ’…


🌸 DESCRIPTION 🌸

so sending patches to a mailing list is just… a whole thing that people do, right? and git send-email is like the famous tool for that job. send-patch exists to wrap that tool up, make it way less annoying to use, and glue it together with the other kw features so you're not out here memorizing flags like a medieval scribe. 🧚

here's the iconic part: if you're inside a linux kernel tree, the send feature will auto populate the to and cc fields of every patch file with the correct maintainers and mailing lists that it fetches using the get_maintainer.pl script. and it will also use the union of the recipients of each patch as the recipients of the cover-letter. yes, the whole union. it's giving teamwork. 🫢

Note: you can block specific e-mail addresses from getting auto-added to the recipients list of the patches, using the blocked_emails option in the send_patch.config file. protect your peace, bestie. πŸ™ˆ
Note: you can add To: and CC: recipients that get included by default, using the default_to_recipients and default_cc_recipients configurations β€” respectively, babes β€” in the send_patch.config file.
Note: any option that git send-email recognizes can be passed straight through to it, as long as you put it after the double dash (--) argument. sneak it in the back door, it's fine. πŸ’–

πŸ‘‘ OPTIONS πŸ‘‘

  • -s, --send β€” send a patch by e-mail using git send-email, to the addresses you gave with --to and --cc. you can also hand over <extra-args> to be passed directly to git send-email, and those go after the double dash (--) argument. by default this function assumes these arguments for git send-email:
--annotate --cover-letter --no-chain-reply-to --thread
Note: you can change the default arguments used to send emails in the send_patch.config file. you're the main character, customize it. ✨
  • --to='<recipient>,...' β€” tell it who's getting the patch by e-mail. the <recipient> list can be in any format git send-email accepts, e.g.: some@email.com or Xpto Lala <lala.xpto@mail.com>. yes both. she's flexible. πŸ’…
  • --cc='<recipient>,...' β€” tell it who's getting a copy of the patch by e-mail. the fyi squad. πŸ“¬
  • --simulate β€” do literally everything without actually sending the e-mail. this is basically git send-email's --dry-run option. rehearse the whole thing, then hit send fr fr. 🎭
  • --private β€” suppress the auto generation of recipients. no automatic plus-ones. πŸ™…
  • --rfc β€” adds a request for comment prefix to the e-mail's subject. classic move. 🏷️
  • <rev-range>... β€” specify the <rev-range> to be sent. the last commit is taken as the default. one commit is the vibe default. 🌸
  • -v<version> β€” specify a number <version> for your patch. v2 era, we love growth. 🌱
  • -t, --setup β€” initialize and configure the mail functionality. each argument specifies a <config> to be set with the corresponding <value>, and you can pass multiple <config> <value> pairs at once. current accepted options are:
--name           <name>
--email          <email>
--smtpuser       <email>
--smtpserver     <domain>
--smtpserverport <port>
--smtpencryption <encryption>
--smtppass       <password>
  • -i, --interactive β€” interactively prompt the user for the values of the options. recommended for inexperienced users. no shame in it, everybody starts somewhere bestie. πŸ«‚
  • -n, --no-interactive β€” inhibits interactive properties, particularly from the template option. quiet mode, respectfully. 🀫
  • --local β€” forces the commands to be run at a local scope. if nothing is passed, all changes will be applied locally β€” but the listing and verification will happen in all scopes. so it's local by default but it still checks everywhere. ikyk. 🏠
  • --global β€” same as --local but in the global scope. 🌍
  • -f, --force β€” forces the configurations to be added, regardless of conflicts with the current values already set in the system. implies --no-interactive. no questions asked, no mercy. πŸ’₯
  • --verify β€” verify that all the settings needed are set and valid. the vibe check, but for configs. πŸ”
  • --template[=<template>] β€” loads the default configuration values based on the given <template>. if no template is given, the user will be shown the available templates to choose from. pick your fighter. πŸŽ€
  • -l, --list β€” lists the settings that mail uses. the receipts. 🧾
  • --verbose β€” verbose mode makes the kw program display debug messages so you can track its progress. this is super useful during debugging, letting you identify possible errors way more easily. when something's off, turn this on and let her yap. πŸ—£οΈ

🌈 EXAMPLES 🌈

The gmail setup. if you wish to use gmail, run this to set all the variables at once:

kw send-patch -t --name 'Xpto Lala' --email myemail@gmail.com --smtpencryption tls \
  --smtpserver smtp.gmail.com --smtpserverport 587 --smtpuser myemail@gmail.com

one command, whole identity configured. slay. πŸ’–

Practice run. to simulate sending the last commit as a patch, just write:

kw send-patch --send --simulate --to=some@email.com

The real thing. then, when you're sure the command executed as expected, drop the --simulate argument to actually send the patch:

kw send-patch --send --to=some@email.com

go off, send it. πŸ”₯

A range of commits. to send a range, use:

kw send-patch  -s <SHA1>..<SHA2>

Extra args. extra arguments can be passed directly to git send-email like this:

kw send-patch  -s --to='some@email.com' -- --thread

Kernel tree mode. if you're inside a linux kernel tree, send the last three commits as a patchset to the maintainers of the subsystems β€” with copies to the appropriate mailing lists β€” using:

kw send-patch  -s -3

literally the dream workflow, the automation is doing the socializing for you. πŸ¦‹


that's the whole page bestie, every flag accounted for, nothing skipped, we don't gatekeep here. πŸ’œ

and if you ever forget any of this, just call back the manual named kw-send-patch β€” the patch-sending-through-mail one β€” same name up top, same name in the sign-off down here, nothing lost, everything kept. βœ¨πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from