KW-SEND-PATCH(1)
π 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 theblocked_emailsoption in thesend_patch.configfile. protect your peace, bestie. π
Note: you can addTo:andCC:recipients that get included by default, using thedefault_to_recipientsanddefault_cc_recipientsconfigurations β respectively, babes β in thesend_patch.configfile.
Note: any option thatgit send-emailrecognizes 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 usinggit send-email, to the addresses you gave with--toand--cc. you can also hand over<extra-args>to be passed directly togit send-email, and those go after the double dash (--) argument. by default this function assumes these arguments forgit 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 formatgit send-emailaccepts, e.g.:some@email.comorXpto 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 basicallygit send-email's--dry-runoption. 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--localbut 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
- ubuntu stonking: kworkflow 1:0.10-3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms