STG-MAIL(1)
π STG-MAIL(1) β send patches by email, bestie π
okay so this is the stg-mail manual page from the StGit Manual, and it's literally all about sending patches by email. no cap, it's giving "email era but make it git" energy. let's get into it β¨
π SYNOPSIS π
stg mail [options] [--] [<patch1>] [<patch2>] [<patch3>..<patch4>]
π¦ DESCRIPTION π¦
okay so here's the vibe check: you use stg mail to send a patch or a whole range of patches by e-mail π. it uses the SMTP server that's specified by the stgit.smtpserver configuration option, or you can override that with the --smtp-server command line option. and yes, that option can also be an absolute path to sendmail followed by command line arguments. slay π
.
the From address and the e-mail format are generated from the template file that you pass as an argument to --template. it defaults to .git/patchmail.tmpl or ~/.stgit/templates/patchmail.tmpl or /usr/share/stgit/templates/patchmail.tmpl. lowkey iconic that it checks all those spots. a patch can be sent as an attachment using the --attach option, and in that case the mailattch.tmpl template will be used instead of patchmail.tmpl. periodt π.
the To/Cc/Bcc addresses can either be added to the template file or passed via the corresponding command line options. they can be e-mail addresses or aliases which are automatically expanded to the values stored in the [mail "alias"] section of Git configuration files. the way that just works is so satisfying π«Ά.
a preamble e-mail can be sent using the --cover and/or --edit-cover options. --cover lets you specify a file to be used as a template. --edit-cover will invoke the editor on the specified file (defaulting to .git/covermail.tmpl or ~/.stgit/templates/covermail.tmpl or /usr/share/stgit/templates/covermail.tmpl). cover letter energy, we love to see it π.
all the subsequent e-mails appear as replies to the first e-mail sent (either the preamble or the first patch). e-mails can be seen as replies to a different e-mail by using the --in-reply-to option. threading realness π¬.
SMTP authentication is also possible with --smtp-user and --smtp-password options, and they're also available as configuration settings: smtpuser and smtppassword. TLS encryption can be enabled by --smtp-tls option and smtptls setting. secure the bag π.
the following variables are accepted by both the preamble and the patch e-mail templates:
%(diffstat)s - diff statistics
%(number)s - empty if only one patch is sent or 'patchnr/totalnr'
%(snumber)s - stripped version of '%(number)s'
%(nspace)s - ' ' if %(number)s is non-empty, otherwise empty string
%(patchnr)s - patch number
%(sender)s - 'sender' or 'authname <authemail>' as per the config file
%(totalnr)s - total number of patches to be sent
%(version)s - 'version' string passed on the command line (or empty)
%(vspace)s - ' ' if %(version)s is non-empty, otherwise empty string
in addition to the common variables, the preamble e-mail template accepts the following:
%(shortlog)s - first line of each patch description, listed by author
in addition to the common variables, the patch e-mail template accepts the following:
%(authdate)s - patch creation date
%(authemail)s - author's email
%(authname)s - author's name
%(commemail)s - committer's e-mail
%(commname)s - committer's name
%(diff)s - unified diff of the patch
%(fromauth)s - 'From: author\n\n' if different from sender
%(longdescr)s - the rest of the patch description, after the first line
%(patch)s - patch name
%(prefix)s - 'prefix' string passed on the command line
%(pspace)s - ' ' if %(prefix)s is non-empty, otherwise empty string
%(shortdescr)s - the first line of the patch description
β¨ OPTIONS β¨
-a,--allβ e-mails all the applied patches. every single one, bestie π--to TOβ adds TO to the To: list. slide into their inbox π¬--cc CCβ adds CC to the Cc: list. keeping them in the loop π--bcc BCCβ adds BCC to the Bcc: list. secret copy energy π€«--autoβ automatically cc's the patch signers. the way that just handles it π«Ά--no-threadβ do not send subsequent messages as replies. no threading, just vibes π§΅π«--unrelatedβ sends patches without sequence numbering. no numbers, no cap π’--attachβ sends a patch as an attachment. attached and slaying π--attach-inlineβ sends a patch inline and as an attachment. both at once, iconic π-v VERSION,--version VERSIONβ adds VERSION to the[PATCH ...]prefix. version vibes π--prefix PREFIXβ adds PREFIX to the[... PATCH ...]prefix. prefix realness β¨-t FILE,--template FILEβ uses FILE as the message template. template queen π-c FILE,--cover FILEβ sends FILE as the cover message. cover message slay π-e,--edit-coverβ edits the cover message before sending. edit that cover βοΈ-E,--edit-patchesβ edits each patch before sending. edit every single one π-s SECONDS,--sleep SECONDSβ sleeps for SECONDS between e-mails sending. give it a sec β--in-reply-to REFIDβ uses REFID as the reference id. reply game strong π¬--smtp-server HOST[:PORT]or"/path/to/sendmail -t -i"β SMTP server or command to use for sending mail. server vibes π-u USER,--smtp-user USERβ username for SMTP authentication. who dis? π΅οΈβοΈ-p PASSWORD,--smtp-password PASSWORDβ password for SMTP authentication. secret slay π-T,--smtp-tlsβ uses SMTP with TLS encryption. secure the bag π-b BRANCH,--branch BRANCHβ uses BRANCH instead of the default branch. branch out πΏ-m,--mboxβ generates an mbox file instead of sending. save it for later π--domain DOMAINβ uses DOMAIN when generating message IDs (instead of the system hostname). domain flex π»--gitβ usesgit send-email(EXPERIMENTAL). experimental, so proceed with flair π§ͺ-O OPTIONS,--diff-opts OPTIONSβ extra options to pass togit diff. diff it up π
πΈ STGIT πΈ
part of the StGit suite β see stg(1). family realness π«Ά
this page was fr fr born on 07/23/2022 as part of StGit 1.5 π stay slaying, bestie π β¨
π¦ where this page comes from
- epel 9: stgit 1.5-3.el9 Β· GPLv2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms