mirror of
https://github.com/git/git.git
synced 2025-09-10 22:44:50 +02:00
Merge branch 'jc/mailsplit-warn-on-tty'
"git am" can read from the standard input when no mailbox is given on the command line, but the end-user gets no indication when it happens, making Git appear stuck. * jc/mailsplit-warn-on-tty: am/apply: warn if we end up reading patches from terminal
This commit is contained in:
@@ -223,6 +223,9 @@ static int split_mbox(const char *file, const char *dir, int allow_bare,
|
||||
FILE *f = !strcmp(file, "-") ? stdin : fopen(file, "r");
|
||||
int file_done = 0;
|
||||
|
||||
if (isatty(fileno(f)))
|
||||
warning(_("reading patches from stdin/tty..."));
|
||||
|
||||
if (!f) {
|
||||
error_errno("cannot open mbox %s", file);
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user