diff options
| author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2019-12-13 08:07:49 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-12-13 12:37:13 -0800 |
| commit | 1942ee44e8b1715a2e0555a0ea432ea6ab488f4e (patch) | |
| tree | 8ba23e5bbf2cbe9cb67c9bb27c572db0bfc5983c /builtin/commit.c | |
| parent | built-in add -i: start implementing the `patch` functionality in C (diff) | |
| download | git-1942ee44e8b1715a2e0555a0ea432ea6ab488f4e.tar.gz git-1942ee44e8b1715a2e0555a0ea432ea6ab488f4e.zip | |
built-in add -i: wire up the new C code for the `patch` command
The code in `git-add--interactive.perl` that takes care of the `patch`
command can look quite intimidating. There are so many modes in which it
can be called, for example.
But for the `patch` command in `git add -i`, only one mode is relevant:
the `stage` mode. And we just implemented the beginnings of that mode in
C so far. So let's use it when `add.interactive.useBuiltin=true`.
Now, while the code in `add-patch.c` is far from reaching feature parity
with the code in `git-add--interactive.perl` (color is not implemented,
the diff algorithm cannot be configured, the colored diff cannot be
post-processed via `interactive.diffFilter`, many commands are
unimplemented yet, etc), hooking it all up with the part of `git add -i`
that is already converted to C makes it easier to test and develop it.
Note: at this stage, both the `add.interactive.useBuiltin` config
setting is still safely opt-in, and will probably be fore quite some
time, to allow for thorough testing "in the wild" without adversely
affecting existing users.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions
