MCPcopy Create free account
hub / github.com/git/git / cmd__userdiff

Function cmd__userdiff

t/helper/test-userdiff.c:26–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26int cmd__userdiff(int argc, const char **argv)
27{
28 enum userdiff_driver_type want = 0;
29 if (argc != 2)
30 return 1;
31
32 if (!strcmp(argv[1], "list-drivers"))
33 want = (USERDIFF_DRIVER_TYPE_BUILTIN |
34 USERDIFF_DRIVER_TYPE_CUSTOM);
35 else if (!strcmp(argv[1], "list-builtin-drivers"))
36 want = USERDIFF_DRIVER_TYPE_BUILTIN;
37 else if (!strcmp(argv[1], "list-custom-drivers"))
38 want = USERDIFF_DRIVER_TYPE_CUSTOM;
39 else
40 return error("unknown argument %s", argv[1]);
41
42 if (want & USERDIFF_DRIVER_TYPE_CUSTOM) {
43 setup_git_directory(the_repository);
44 repo_config(the_repository, cmd__userdiff_config, NULL);
45 }
46
47 for_each_userdiff_driver(driver_cb, &want);
48
49 return 0;
50}

Callers

nothing calls this directly

Calls 4

errorFunction · 0.85
setup_git_directoryFunction · 0.85
for_each_userdiff_driverFunction · 0.85
repo_configFunction · 0.50

Tested by

no test coverage detected