]> git.ipfire.org Git - thirdparty/git.git/commit
add-patch: add support for in-memory index patching
authorPatrick Steinhardt <ps@pks.im>
Wed, 3 Dec 2025 10:48:36 +0000 (11:48 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Dec 2025 21:49:46 +0000 (13:49 -0800)
commit6b099bdd4daeb0d460867cfeb8ed147d39aafed7
treea7819c65fd5857ecd8d6f86dda82ce55499ff0c5
parent0d1d11f2e90301a9c59749b143caae3c69f9b93d
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