summaryrefslogtreecommitdiff
path: root/add-patch.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-10-24 13:48:05 -0700
committerJunio C Hamano <gitster@pobox.com>2025-10-24 13:48:05 -0700
commit7d763b98ef35d78a47c0606c6824e677b67bcb1c (patch)
tree49fe6d1fcf570fcc32911aa676f835a27522f143 /add-patch.c
parent78bf9ce0d19cf8af14712ffb6544c16730b0e954 (diff)
parent301e20da208d23e9ea03d58e1488973c6f1f939a (diff)
Merge branch 'rs/add-patch-document-p-for-pager'
Show 'P'ipe command in "git add -p". * rs/add-patch-document-p-for-pager: add-patch: fully document option P
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 9402dc71bc..ae9a20d8f2 100644
--- a/add-patch.c
+++ b/add-patch.c
@@ -1416,7 +1416,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)
@@ -1547,7 +1548,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;