Re: git fails with a broken pipe when one quits the pager
flat view
From: Vincent Lefevre <hidden>
Date: 2021-01-31 03:49:12
On 2021-01-31 04:36:52 +0100, Vincent Lefevre wrote:
On 2021-01-31 02:47:59 +0100, Ævar Arnfjörð Bjarmason wrote:quoted
On Fri, Jan 15 2021, Vincent Lefevre wrote:quoted
The broken pipe is internally expected, thus should not be reported by git. Just to be clear: this broken pipe should be discarded only when git uses its builtin pager feature, not with a general pipe, where the error may be important. For instance, $ { git log ; echo "Exit status: $?" >&2 ; } | true should still output Exit status: 141I don't get it, how is it less meaningful when git itself invokes the pager?I don't understand your question. If I invoke the pager myself, I don't get a SIGPIPE: cventin:~/software/gcc-trunk> git log cventin:~/software/gcc-trunk[PIPE]> git log|m cventin:~/software/gcc-trunk>
Well, more precisely, I mean that it is not reported. But the SIGPIPE itself still occurs as expected, e.g. for scripts, and one may choose to ignore it or not, as usual. -- Vincent Lefèvre [off-list ref] - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)