checkout: introduce checkout.overlayMode config
[gitweb.git] / builtin / diff-files.c
index 9200069363ff016d167f6885688650158c12e507..48cfcb935d0413fcf3850e0c28ec237b642b38a2 100644 (file)
@@ -4,6 +4,7 @@
  * Copyright (C) Linus Torvalds, 2005
  */
 #include "cache.h"
+#include "config.h"
 #include "diff.h"
 #include "commit.h"
 #include "revision.h"
@@ -11,7 +12,7 @@
 #include "submodule.h"
 
 static const char diff_files_usage[] =
-"git diff-files [-q] [-0/-1/2/3 |-c|--cc] [<common diff options>] [<path>...]"
+"git diff-files [-q] [-0 | -1 | -2 | -3 | -c | --cc] [<common-diff-options>] [<path>...]"
 COMMON_DIFF_OPTIONS_HELP;
 
 int cmd_diff_files(int argc, const char **argv, const char *prefix)
@@ -20,10 +21,13 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix)
        int result;
        unsigned options = 0;
 
-       init_revisions(&rev, prefix);
-       gitmodules_config();
+       if (argc == 2 && !strcmp(argv[1], "-h"))
+               usage(diff_files_usage);
+
        git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
+       repo_init_revisions(the_repository, &rev, prefix);
        rev.abbrev = 0;
+       precompose_argv(argc, argv);
 
        argc = setup_revisions(argc, argv, &rev, NULL);
        while (1 < argc && argv[1][0] == '-') {