目录 搜索
Guides gitattributes giteveryday gitglossary gitignore gitmodules gitrevisions gittutorial gitworkflows Administration git archive git bundle git clean git filter-branch git fsck git gc git instaweb git reflog Basic Snapshotting git add git commit git diff git mv git reset git rm git status Branching and Merging git branch git checkout git log git merge git mergetool git stash git tag Debugging git bisect git blame git grep Email git am git format-patch git request-pull git send-email External Systems git fast-import git svn Getting and Creating Projects git clone git init Git git annotate git archimport git bisect-lk2009 git check-attr git check-mailmap git check-ref-format git checkout-index git cherry git citool git column git credential git credential-cache git credential-store git cvsexportcommit git cvsimport git cvsserver git diff-files git diff-tree git difftool git fast-export git fetch-pack git fmt-merge-msg git get-tar-commit-id git gui git http-backend git http-fetch git http-push git imap-send git index-pack git interpret-trailers git ls-remote git ls-tree git mailinfo git mailsplit git merge-file git merge-index git merge-one-file git merge-tree git mktag git mktree git name-rev git notes git p4 git pack-objects git pack-redundant git pack-refs git parse-remote git patch-id git prune git prune-packed git quiltimport git receive-pack git remote-ext git remote-fd git remote-testgit git repack git replace git rerere git send-pack git sh-i18n git sh-setup git shell git show-branch git show-index git stripspace git unpack-file git unpack-objects git upload-archive git upload-pack git var git verify-commit git verify-tag git whatchanged git worktree Inspection and Comparison git describe git shortlog git show Miscellaneous api credentials api index gitcli gitcore tutorial gitcredentials gitcvs migration gitdiffcore githooks gitk gitnamespaces gitremote helpers gitrepository layout gitsubmodules gittutorial 2 gitweb gitweb.conf pack format User Manual Patching git apply git cherry-pick git rebase git revert Plumbing Commands git cat-file git check-ignore git commit-tree git count-objects git diff-index git for-each-ref git hash-object git ls-files git merge-base git read-tree git rev-list git rev-parse git show-ref git symbolic-ref git update-index git update-ref git verify-pack git write-tree Server Admin git daemon git update-server-info Setup and Config git git config git help Sharing and Updating Projects git fetch git pull git push git remote git submodule
文字

名称

git-mailinfo  - 从单个电子邮件中提取补丁和作者身份

概要

git mailinfo [-k|-b] [-u | --encoding=<encoding> | -n] [--[no-]scissors] <msg> <patch>

描述

从标准输入读取单个电子邮件消息,并将提交日志消息写入<msg>文件中,并将修补程序写入<patch>文件中。作者姓名,电子邮件和电子邮件主题将写入标准输出以供git am创建提交使用。通常不需要直接使用此命令。请参阅 git-am [1]。

选项

-k

通常,程序会从 Subject:标题行中删除电子邮件,以提取提交日志消息的标题行。这个选项可以防止这种转换,并且在用于回读git format-patch -k输出时最有用。

具体来说,以下内容将被删除,直到它们都不存在:

  • 引导和尾随空白。

  • Leading Re:, re:, and :.

  • Leading bracketed strings (between [ and ], usually [PATCH]).

最后,空格的运行标准化为单个 ASCII 空间字符。

-b

当-k不起作用时,括号内[]对的所有前导字符串都将被去除。此选项限制剥离仅限于括号中包含单词“PATCH”的字符串。

-u

提交日志消息,作者姓名和作者电子邮件从电子邮件中获取,并且在对MIME传输编码进行最低限度解码后,通过音译将其重新编码到由i18n.commitencoding(缺省为UTF-8)指定的字符集中。这曾经是可选的,但现在它是默认的。

请注意,即使使用此标志,该补丁也始终按原样使用,无需字符集转换。

--encoding=<encoding>

类似于-u。但是,在重新编码时,使用此处指定的字符集而不是 i18n.commitencoding 或 UTF-8指定的字符集。

-n

禁用元数据的所有字符集重新编码。

-m   --message-id

在提交消息的末尾复制 Message-ID 标题。这对于将提交与邮件列表讨论相关联很有用。

--scissors

在剪刀线之前删除身体中的所有东西。主要由剪刀(“> 8”或“8”)和穿孔(短划线“ - ”)标记组成的线称为剪刀线,用于请求读者剪切该线处的信息。如果这条线出现在补丁前的消息正文中,则使用此选项时,会忽略它之前的所有内容(包括剪刀线本身)。

如果您想在讨论主题中开始您的消息,并对您正在响应的消息提出意见和建议,并使用补丁提交结束讨论,并使用剪刀将建议的提交日志消息分开线。

这可以通过配置选项 mailinfo.scissors 默认启用。

--no-scissors

忽略剪刀线。用于重写 mailinfo.scissors 设置。

<msg>

提交日志消息从电子邮件中提取,通常除了来自电子邮件主题的标题行之外。

<patch>

该补丁从电子邮件中提取。

上一篇: 下一篇: