Skip to content

add-patch: render hunks through the pager

Rubén Justo git 7 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest posting 2/24 patches 0 repliesNew
  2. v3 posting 2/24 patches 32 repliesSuperseded
  3. v2 posting 2/24 patches 3 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v4 posting 1/26 patches16 repliesSuperseded
v3 posting 1/26 patches37 repliesSuperseded
v2 posting 1/25 patches4 repliesSuperseded
v15 patches30 repliesSuperseded

Patches in v4 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4add-patch: test for 'p' commandt/t3701-add-interactive.sh+16 -00 replies
2/4pager: do not close fd 2 unnecessarilypager.c+6 -20 replies
3/4pager: introduce wait_for_pagerpager.c pager.h+38 -60 replies
4/4add-patch: render hunks through the pageradd-patch.c t/t3701-add-interactive.sh+43 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/4] add-patch: render hunks through the pager

Make the test name more descriptive and avoid unnecessary redirection.

Thanks.

Rubén Justo (4):
add-patch: test for 'p' command
pager: do not close fd 2 unnecessarily
pager: introduce wait_for_pager
add-patch: render hunks through the pager

 add-patch.c                | 18 ++++++++++++---
 pager.c                    | 45 +++++++++++++++++++++++++++++++++-----
 pager.h                    |  1 +
 t/t3701-add-interactive.sh | 44 +++++++++++++++++++++++++++++++++++++
 4 files changed, 100 insertions(+), 8 deletions(-)

Interdiff against v3:

t/t3701-add-interactive.sh +2 -2
index 2ac860cc42..c60589cb94 100755
@@ -612,11 +612,11 @@ test_expect_success TTY 'print again the hunk (PAGER)' '
 	test_cmp expect actual.trimmed
 '
 
-test_expect_success TTY 'P does not break if pager ends unexpectedly' '
+test_expect_success TTY 'P handles SIGPIPE when writing to pager' '
 	test_when_finished "rm -f huge_file; git reset" &&
 	printf "\n%2500000s" Y >huge_file &&
 	git add -N huge_file &&
-	test_write_lines P q | GIT_PAGER="head -n 1" test_terminal git add -p >actual
+	test_write_lines P q | GIT_PAGER="head -n 1" test_terminal git add -p
 '
 
 test_expect_success 'split hunk "add -p (edit)"' '
Signature · 1 line
2.46.0.rc0.4.g229d67bbd7