diff options
author | 徐沛文 (Aleen) <aleen42@vip.qq.com> | 2021-12-09 07:25:54 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-15 17:04:18 -0800 |
commit | 7c096b8d61e1276acb6f84bf446cfe74578382a0 (patch) | |
tree | 596e8db764d0dc4d98c2a8e59faa71d2ca6eba28 /Documentation | |
parent | doc: git-format-patch: describe the option --always (diff) | |
download | tgif-7c096b8d61e1276acb6f84bf446cfe74578382a0.tar.xz |
am: support --empty=<option> to handle empty patches
Since that the command 'git-format-patch' can include patches of
commits that emit no changes, the 'git-am' command should also
support an option, named as '--empty', to specify how to handle
those empty patches. In this commit, we have implemented three
valid options ('stop', 'drop' and 'keep').
Signed-off-by: 徐沛文 (Aleen) <aleen42@vip.qq.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-am.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 0a4a984dfd..7676bd58ae 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -16,6 +16,7 @@ SYNOPSIS [--exclude=<path>] [--include=<path>] [--reject] [-q | --quiet] [--[no-]scissors] [-S[<keyid>]] [--patch-format=<format>] [--quoted-cr=<action>] + [--empty=(stop|drop|keep)] [(<mbox> | <Maildir>)...] 'git am' (--continue | --skip | --abort | --quit | --show-current-patch[=(diff|raw)]) @@ -63,6 +64,14 @@ OPTIONS --quoted-cr=<action>:: This flag will be passed down to 'git mailinfo' (see linkgit:git-mailinfo[1]). +--empty=(stop|drop|keep):: + By default, or when the option is set to 'stop', the command + errors out on an input e-mail message lacking a patch + and stops into the middle of the current am session. When this + option is set to 'drop', skip such an e-mail message instead. + When this option is set to 'keep', create an empty commit, + recording the contents of the e-mail message as its log. + -m:: --message-id:: Pass the `-m` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]), |