git-gui: handle shell script text filters when loading for blame.

When loading a file into the blame window git-gui does all the work and
must handle the text conversion filters if defined. On Windows it is
necessary to detect the need for a shell script explicitly.

Such filter commands are run using non-blocking I/O but this has the
unfortunate side effect of losing any error that might be reported when
the pipe is closed. Switching to blocking mode just before closing
enables reporting of errors in the filter scripts to the user.

Tested-by: Sebastian Schuberth <>
Signed-off-by: Pat Thoyts <>
2 files changed