]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/am.c
builtin-am: reject patches when there's a session in progress
authorPaul Tan <pyokagan@gmail.com>
Tue, 4 Aug 2015 13:51:36 +0000 (21:51 +0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Aug 2015 05:02:11 +0000 (22:02 -0700)
commit8d185503186ea0bc906defb9ecb1e9fb0e06efae
tree63b046f07be71b7a8a90240effe400d3a344981c
parent33388a71d23e6a296eb33879e418e857444f2d74
builtin-am: reject patches when there's a session in progress

Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am
would error out if the user gave it mbox(s) on the command-line, but
there was a session in progress.

Since c95b138 (Fix git-am safety checks, 2006-09-15), git-am would
detect if the user attempted to feed it a mbox via stdin, by checking if
stdin is not a tty and there is no resume command given.

Re-implement the above two safety checks.

Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/am.c