summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorRubén Justo <rjusto@gmail.com>2024-07-25 15:44:52 +0200
committerJunio C Hamano <gitster@pobox.com>2024-07-25 09:03:00 -0700
commitfc87b2f7c18d0a097c80e4d9ef1f84da687636ab (patch)
treef142e5e8846c600feaf3a78555ab153133888ae9 /builtin/commit.c
parente8bd8883feb7551f7d1870403d212c77cd56071b (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.c')
0 files changed, 0 insertions, 0 deletions