difftool: add a skeleton for the upcoming builtin

This adds a builtin difftool that still falls back to the legacy Perl
version, which has been renamed to `legacy-difftool`.

The idea is that the new, experimental, builtin difftool immediately hands
off to the legacy difftool for now, unless the config variable
difftool.useBuiltin is set to true.

This feature flag will be used in the upcoming Git for Windows v2.11.0
release, to allow early testers to opt-in to use the builtin difftool and
flesh out any bugs.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2016-11-14 13:21:37 +01:00
parent c897c69f99
commit 7cb0d11cd2
7 changed files with 75 additions and 1 deletions

6
git.c
View File

@@ -424,6 +424,12 @@ static struct cmd_struct commands[] = {
{ "diff-files", cmd_diff_files, RUN_SETUP | NEED_WORK_TREE },
{ "diff-index", cmd_diff_index, RUN_SETUP },
{ "diff-tree", cmd_diff_tree, RUN_SETUP },
/*
* NEEDSWORK: Once the redirection to git-legacy-difftool.perl in
* builtin/difftool.c has been removed, this entry should be changed to
* RUN_SETUP | NEED_WORK_TREE
*/
{ "difftool", cmd_difftool },
{ "fast-export", cmd_fast_export, RUN_SETUP },
{ "fetch", cmd_fetch, RUN_SETUP },
{ "fetch-pack", cmd_fetch_pack, RUN_SETUP },