etsy/TryLib — pull request #8 by mdg (2014-10-08 16:53:12+00:00)
Title: support reading the patch file from stdin

right now I can `git diff > patch.diff && try -p patch.diff`
but it would be easier if I could just do `git diff | try -i`

This patch makes that possible. --patch-stdin is the flag that
tells try to read from stdin instead of the patch.diff file. It
writes stdin straight through to patch.diff and then everything
else continues to work as before.

This did expose one bug which is fixed in
TryLib/Util/PHPOptions/Options.php.
The `stty size` command doesn't run when try is being piped input
from another source. The width did not work in that case and there
was lots of bad output. Now it checks first to see if stdin is a tty
and if not just uses 80.