git-multimail排除git diff及其后续电子邮件。

3
我正在尝试使用git-multimail和gitolite发送电子邮件通知用户更新。按照指示设置相当简单,但我不希望在push时发送多个电子邮件,而只是想要一封概述邮件,类似于...
git log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %ae' --abbrev-commit --date=relative 2da4f6e7..418b7f1b

我尝试过很多方法,但我的当前 git config --list 看起来像这样:

multimailhook.logopts=--pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %ae"
multimailhook.commitemailformat=html
multimailhook.announceshortlog=true
multimailhook.refchangeshowlog=true

这封电子邮件是通过html发送的(颜色传递),但没有任何格式传递 - 我尝试过的所有方法都没有改变电子邮件内容或发送的数量。
1个回答

1
要发送一个摘要(refchange)邮件,您需要停止 multimail 发送提交邮件。要配置此项,您需要 disable multimailhook.commitList:将其设置为 none 或空字符串:
git config multimailhook.commitList none

这个有效,谢谢 - 如果我能像漂亮的格式那样为电子邮件添加样式就好了,但是从代码/注释中可以看出,现有的HTML格式只是一种hack。至少我现在看到了我想要的内容。 - thadmiller

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接