Skip to content

use the pager in 'add -p'

Rubén Justo git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 9 repliesIn review

Patches in v1 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 -61 reply
4/4add-patch: render hunks through the pageradd-patch.c t/t3701-add-interactive.sh+59 -37 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/4] use the pager in 'add -p'

I'm resuming work on introducing a mechanism to use the PAGER to display hunks during interactive "git add -p" sessions, which will make it easier to review large hunks.

The thread where the previous discussion took place is:
https://lore.kernel.org/git/[email protected]/

I'm bringing back the proposal to introduce 'P' as a mechanism to display the current hunks through the PAGER.

I think it's sensible to exclude from the scope of this series the option of a new command '|[cmd]' and other modifications to the original proposal that have raised questions that perhaps deserve their own discussion, outside the scope of this series. Questions like:

- What to do with ANSI codes?
- How to allow the definition of a default command?
- How to facilitate the reuse of a command?
- How to combine a default command with command reuse?
- What to do if the command fails?

To mention a few...

I'm also leaving for a future series a possible configuration "interactive.pipeCommand", "interactive.pager" or similar.

I hope this approach makes sense and allows us to move forward, and that it doesn't represent a step back.

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 | 60 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 116 insertions(+), 8 deletions(-)
Signature · 1 line
2.45.1