aboutsummaryrefslogtreecommitdiffstats
path: root/add-patch.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2025-10-21 20:02:53 +0200
committerJunio C Hamano <gitster@pobox.com>2025-10-21 14:35:44 -0700
commit301e20da208d23e9ea03d58e1488973c6f1f939a (patch)
tree30f26c0aaa332295e934bd521fab21181cf8299b /add-patch.c
parentadd-patch: reset "permitted" at loop start (diff)
downloadgit-301e20da208d23e9ea03d58e1488973c6f1f939a.tar.gz
git-301e20da208d23e9ea03d58e1488973c6f1f939a.zip
add-patch: fully document option P
Show option P in the prompt and explain it properly on a dedicated line in online help and documentation. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'add-patch.c')
-rw-r--r--add-patch.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/add-patch.c b/add-patch.c
index 45839ceac5..737fafdefc 100644
--- a/add-patch.c
+++ b/add-patch.c
@@ -1405,7 +1405,8 @@ N_("j - go to the next undecided hunk, roll over at the bottom\n"
"/ - search for a hunk matching the given regex\n"
"s - split the current hunk into smaller hunks\n"
"e - manually edit the current hunk\n"
- "p - print the current hunk, 'P' to use the pager\n"
+ "p - print the current hunk\n"
+ "P - print the current hunk using the pager\n"
"? - print help\n");
static size_t dec_mod(size_t a, size_t m)
@@ -1536,7 +1537,7 @@ static int patch_update_file(struct add_p_state *s,
permitted |= ALLOW_EDIT;
strbuf_addstr(&s->buf, ",e");
}
- strbuf_addstr(&s->buf, ",p");
+ strbuf_addstr(&s->buf, ",p,P");
}
if (file_diff->deleted)
prompt_mode_type = PROMPT_DELETION;