read-cache: move shared add/checkout/commit code
commit6cee5ebc7af2a05dce64d04ac2ed6aa7ed872f88
authorElijah Newren <newren@gmail.com>
Tue, 16 May 2023 06:33:47 +0000 (16 06:33 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Jun 2023 20:39:53 +0000 (21 13:39 -0700)
tree7c7b76809e7bd0148cda9f44285c70d115482349
parent50c37ee839f0c6842816dec0764d0592b5d048b2
read-cache: move shared add/checkout/commit code

The function add_files_to_cache(), plus associated helper functions,
were defined in builtin/add.c, but also shared with builtin/checkout.c
and builtin/commit.c.  Move these shared functions to read-cache.c.

Diff best viewed with `--color-moved`.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/add.c
read-cache.c