am: support --empty=<option> to handle empty patches
commit7c096b8d61e1276acb6f84bf446cfe74578382a0
author徐沛文 (Aleen) <aleen42@vip.qq.com>
Thu, 9 Dec 2021 07:25:54 +0000 (9 07:25 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Dec 2021 01:04:18 +0000 (15 17:04 -0800)
tree596e8db764d0dc4d98c2a8e59faa71d2ca6eba28
parent552038e26cfa2a1b5a7843567ca7ab39a573951f
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>
Documentation/git-am.txt
builtin/am.c
t/t4150-am.sh