git send-email 支持大量参数,与 reply 相关的参数有好几个,刚开始看时有点不理解,仔细阅读了 git send-email --help 帮助手册后,梳理出如下内容。它们都来自于手册,但被我整理了一番,更易于理解。没有翻译成中文,因为担心翻译的不够准确,会误导大家。内容不多,英文理解起来也不难,多看两遍就掌握了。
- –chain-reply-to
- If this is set, each email will be sent as a reply to the previous email sent.
- When using this, it is recommended that the first file given be an overview of the entire patch series.
- –no-chain-reply-to
- If disabled with “–no-chain-reply-to”, all emails after the first will be sent as replies to the first email sent.
- Disabled by default, but the sendemail.chainReplyTo configuration variable can be used to enable it.
- –thread
- If this is set, the In-Reply-To and References headers will be added to each email sent.
- Whether each mail refers to the previous email (deep threading per git format-patch wording) or to the first email (shallow threading) is governed by “–[no-]chain-reply-to”.
- It is up to the user to ensure that no In-Reply-To header already exists when git send-email is asked to add it (especially note that git format-patch can be configured to do the threading itself).
- –no-thread
- If disabled with “–no-thread”, those headers will not be added (unless specified with –in-reply-to).
- Default is the value of the sendemail.thread configuration value; if that is unspecified, default to –thread.
- –in-reply-to
- Make the first mail (or all the mails with –no-thread) appear as a reply to the given Message-Id, which avoids breaking threads to provide a new patch series.
- The second and subsequent emails will be sent as replies according to the –[no-]chain-reply-to setting.
- So for example when –thread and –no-chain-reply-to are specified, the second and subsequent patches will be replies to the first one like in the illustration below where [PATCH v2 0/3] is in reply to [PATCH 0/2]:
[PATCH 0/2] Here is what I did...
[PATCH 1/2] Clean up and tests
[PATCH 2/2] Implementation
[PATCH v2 0/3] Here is a reroll
[PATCH v2 1/3] Clean up
[PATCH v2 2/3] New tests
[PATCH v2 3/3] Implementation