diff options
author | Rubén Justo <rjusto@gmail.com> | 2024-07-25 15:44:52 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-07-25 09:03:00 -0700 |
commit | fc87b2f7c18d0a097c80e4d9ef1f84da687636ab (patch) | |
tree | f142e5e8846c600feaf3a78555ab153133888ae9 /builtin/commit-graph.c | |
parent | e8bd8883feb7551f7d1870403d212c77cd56071b (diff) |
add-patch: render hunks through the pager
Make the print command trigger the pager when invoked using a capital
'P', to make it easier for the user to review long hunks.
Note that if the PAGER ends unexpectedly before we've been able to send
the payload, perhaps because the user is not interested in the whole
thing, we might receive a SIGPIPE, which would abruptly and unexpectedly
terminate the interactive session for the user.
Therefore, we need to ignore a possible SIGPIPE signal. Add a test for
this, in addition to the test for normal operation.
For the SIGPIPE test, we need to make sure that we completely fill the
operating system's buffer, otherwise we might not trigger the SIGPIPE
signal. The normal size of this buffer in different OSs varies from a
few KBs to 1MB. Use a payload large enough to guarantee that we exceed
this limit.
Signed-off-by: Rubén Justo <rjusto@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions