Re: [PATCH 0/8] build-in add -i: implement all commands in the main loop
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 18, 2019, 02:27 UTC
- Message-ID
- <xmqqlfsd3omz.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <pull.171.git.1573821382.gitgitgadget@gmail.com>
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:
> ... there is so little overlap between the git add --patch part > and the rest of git add --interactive that I could put the former > into a totally different file: add-patch.c.
We would want to call, after "add -i in C" stabilizes, directly into "add -p" machinery from different subcommands such as "reset", "checkout", etc., and bypass the rest of "add -i" when we do so. We can credit the lack of overlap to the design that supports such usage while it is still in a scripted Porcelain.
Preparing the "add -p" machinery in such a way that "add -i" merely is one of the users would make a lot of sense from organizational point of view.
Thanks.