git send-email 中 --in-reply-to 相关参数梳理

git send-email 支持大量参数,与 reply 相关的参数有好几个,刚开始看时有点不理解,仔细阅读了 git send-email --help 帮助手册后,梳理出如下内容。它们都来自于手册,但被我整理了一番,更易于理解。没有翻译成中文,因为担心翻译的不够准确,会误导大家。内容不多,英文理解起来也不难,多看两遍就掌握了。

  1. –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.
  1. –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.
  1. –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).
  1. –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.
  1. –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
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值