git-submodule.sh: accept verbose flag in cmd_update to be non-quiet
[gitweb.git] / builtin / diff-index.c
index 1af373d0021f56f539a1d261e908a60d92ff5b4f..d59bf6cf5f8da394251532765f27a044c14a572d 100644 (file)
@@ -17,9 +17,12 @@ int cmd_diff_index(int argc, const char **argv, const char *prefix)
        int i;
        int result;
 
+       if (argc == 2 && !strcmp(argv[1], "-h"))
+               usage(diff_cache_usage);
+
+       git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
        init_revisions(&rev, prefix);
        gitmodules_config();
-       git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
        rev.abbrev = 0;
        precompose_argv(argc, argv);