summaryrefslogtreecommitdiff
path: root/t/test-terminal.perl
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2019-11-29 21:11:42 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-12-01 07:30:54 -0800
commitc08171d156f6f77bdab6500f0b433b650a31ccae (patch)
treed44096ccca43ec17dcfcb5cb1a7426906d07fd8b /t/test-terminal.perl
parentadd-interactive: make sure to release `rev.prune_data` (diff)
downloadtgif-c08171d156f6f77bdab6500f0b433b650a31ccae.tar.xz
built-in add -i: allow filtering the modified files list
In the `update` command of `git add -i`, we are primarily interested in the list of modified files that have worktree (i.e. unstaged) changes. At the same time, we need to determine _also_ the staged changes, to be able to produce the full added/deleted information. The Perl script version of `git add -i` has a parameter of the `list_modified()` function for that matter. In C, we can be a lot more precise, using an `enum`. The C implementation of the filter also has an easier time to avoid unnecessary work, simply by using an adaptive order of the `diff-index` and `diff-files` phases, and then skipping files in the second phase when they have not been seen in the first phase. Seeing as we change the meaning of the `phase` field, we rename it to `mode` to reflect that the order depends on the exact invocation of the `git add -i` command. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-terminal.perl')
0 files changed, 0 insertions, 0 deletions