add -p: fix worktree patch mode prompts
commitf6f0ee247f17194a52f445f865001de59ffa810f
authorRené Scharfe <l.s.r@web.de>
Wed, 14 Sep 2022 09:47:33 +0000 (14 11:47 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Sep 2022 18:14:38 +0000 (14 11:14 -0700)
treea9f7b6b62fba021c85cc246368a2d6bd1302b616
parenta0feb8611d4c0b2b5d954efe4e98207f62223436
add -p: fix worktree patch mode prompts

cee6cb7300 (built-in add -p: implement the "worktree" patch modes,
2019-12-21) added the worktree patch modes to the built-in add -p.
Its commit message claims to be a port of 2f0896ec3ad4 (restore:
support --patch, 2019-04-25), which did the same for the script
git-add--interactive.perl.

The script mentioned only the worktree in its prompt messages in
worktree mode, while the built-in mentions the worktree and also the
index, even though the command doesn't actually affect the index.

2c8bd8471a (checkout -p: handle new files correctly, 2020-05-27)
added new prompt messages for addition that also mention the index in
worktree mode in the built-in, but not in the script.

Correct these prompts to state that only the worktree will be affected.

Reported-by: David Plumpton <david.plumpton@gmail.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
add-patch.c