Re: [PATCH v2 1/3] test_terminal: redirect child process' stdin to a pty

2015-08-11 Thread Paul Tan
On Fri, Aug 7, 2015 at 6:15 AM, Eric Sunshine sunsh...@sunshineco.com wrote: An alternative would be to have git-am detect that it is being tested and pretend that isatty() returns true. I would vastly prefer a solution that would work for everything, for all the C code and scripts, instead of

Re: [PATCH v2 1/3] test_terminal: redirect child process' stdin to a pty

2015-08-06 Thread Eric Sunshine
On Tue, Aug 4, 2015 at 10:08 AM, Paul Tan pyoka...@gmail.com wrote: When resuming, git-am detects if we are trying to feed it patches or not by checking if stdin is a TTY. However, the test library redirects stdin to /dev/null. This makes it difficult, for instance, to test the behavior of

[PATCH v2 1/3] test_terminal: redirect child process' stdin to a pty

2015-08-04 Thread Paul Tan
When resuming, git-am detects if we are trying to feed it patches or not by checking if stdin is a TTY. However, the test library redirects stdin to /dev/null. This makes it difficult, for instance, to test the behavior of git am -3 when resuming, as git-am will think we are trying to feed it