#914896 git fails with a broken pipe when one quits the pager

Package:
git
Source:
git
Description:
fast, scalable, distributed revision control system
Submitter:
Vincent Lefevre
Date:
2022-05-06 10:36:03 UTC
Severity:
normal
Tags:
#914896#5
Date:
2018-11-28 11:59:51 UTC
From:
To:
Some git commands with a lot of output fail with a broken pipe when
one quits the pager (without going to the end of the output).

For instance, in zsh:

cventin% setopt PRINT_EXIT_VALUE
cventin% git log
zsh: broken pipe  git log
cventin% echo $?
141
cventin%

This is annoying. And of course, I don't want to hide error messages
by default, because this would hide *real* errors.

The broken pipe is internally expected, thus should not be reported
by git.

#914896#10
Date:
2018-11-28 12:11:41 UTC
From:
To:
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: 141

like currently.