suppresscc = all //will suppress all auto cc values
confirm = always
#to = *****.****@gmail.com //Specify the primary recipient
#cc = s***linux@freelists.org //CC list
2. Then edit
the .git/hooks/pre-commit file
to contain only the following two lines:
#!/bin/sh
exec git diff --cached | scripts/checkpatch.pl --no-signoff - || true
二. 好了,下面就是提交的步骤了。
1. 按功能分类提交commit ,提交之前先执行脚本 ./scripts/cleanfile xx.
3. 检查patch:
./scripts/checkpatch.pl
0001-nfs-add-a-pr_info.patch (不用检查0000-cover-letter.patch)
4. 发邮件列表:
git send-email *.patch
如果想要编辑patch邮件内容,加--annotate选项。
编辑完一个退出vim用:wn命令,编辑下一个patch,直到最后一个直接wq退出vim即可。
$ git send-email
*.patch
/tmp/59yD80Mjvb/0000-cover-letter.patch
/tmp/59yD80Mjvb/0001-clone-patch-test-001.patch
/tmp/59yD80Mjvb/0002-revised-text.patch
3 files to edit
Who should the emails appear to be from? [chunyan.zhang ]zh**.****@gmail.com//输入发件人邮箱
Emails will be sent from: zhang.lyra@gmail.com
Who should the emails be sent to? z***@gmail.com //输入收件人邮箱
Message-ID to be used as In-Reply-To for the first email?for_test//随便输入一个ID
附:标准的patch格式
The canonical patch subject line is:
Subject: [PATCH 001/123] subsystem: summary phrase
The canonical patch message body contains the following:
- A "from" line specifying the patch author.
- An empty line.
- The body of the explanation, which will be copied to the
permanent changelog to describe this patch.
- The "Signed-off-by:" lines, described above, which will
also go in the changelog.
- A marker line containing simply "---".
- Any additional comments not suitable for the changelog.
- The actual patch (diff output).
参考:
http://www.freedesktop.org/wiki/Software/PulseAudio/HowToUseGitSendEmail/
http://blog.chinaunix.net/uid-28453894-id-3552774.html
http://kernelnewbies.org/OPWfirstpatch