2bbad40
Handle write errors (such as broken pipes) when writing diffs
Click to expand commit body
Preserve write errors from write calls, and propagate them to the caller
of write_diff, rather than calling .unwrap(). This also avoids
attempting to propagate a panic through a libgit2 callback, which
re-panics.
Josh Triplett
created
55ab14d
If writing an error to the pager fails, write it to stderr
Click to expand commit body
This ensures that errors about the pager itself, such as broken pipes,
show up somewhere.
Josh Triplett
created
48a533a
Support the pager in series, req, and status
Click to expand commit body
Add support for commands that support a pager but don't auto-pager
unless explicitly configured to do so. This allows matching the
behavior of "git status" and "git branch", which don't auto-pager by
default.
Improve error handling in these commands to avoid panics on write errors
such as broken pipes.
Josh Triplett
created
8877c1b
Improve stderr handling for commands that spawn a pager
Click to expand commit body
After spawning the pager, if stderr would have gone to a tty, send it to
the pager as well. That avoids having the pager and error output step
on each other.