STG-MAIL(1)

πŸ“¦ version 1.5, in epel 9

πŸ’Œ 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 β€” uses git send-email (EXPERIMENTAL). experimental, so proceed with flair πŸ§ͺ
  • -O OPTIONS, --diff-opts OPTIONS β€” extra options to pass to git 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