]> git.ipfire.org Git - thirdparty/git.git/commit
add-patch: add support for in-memory index patching
authorPatrick Steinhardt <ps@pks.im>
Mon, 2 Mar 2026 12:13:08 +0000 (13:13 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Mar 2026 23:09:35 +0000 (15:09 -0800)
commit0c5583a57d618db191afceeff54e8cafbee89f41
tree2f9efd7a1283ec541f91df7f37527325b5c8e499
parentd51b61f5dab9c8e715fa792f31d572bc96fb5687
add-patch: add support for in-memory index patching

With `run_add_p()` callers have the ability to apply changes from a
specific revision to a repository's index. This infra supports several
different modes, like for example applying changes to the index,
working tree or both.

One feature that is missing though is the ability to apply changes to an
in-memory index different from the repository's index. Add a new
function `run_add_p_index()` to plug this gap.

This new function will be used in a subsequent commit.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
add-patch.c
add-patch.h