]> asedeno.scripts.mit.edu Git - git.git/blobdiff - builtin-diff.c
Merge git://git.kernel.org/pub/scm/gitk/gitk
[git.git] / builtin-diff.c
index 8b3b51eae0f928d217c7c91f294f1498d05ad1cf..7ffea975059f9e13b07ca680e6707ffc14973f90 100644 (file)
@@ -21,7 +21,7 @@ struct blobinfo {
 };
 
 static const char builtin_diff_usage[] =
-"git-diff <options> <rev>{0,2} -- <path>*";
+"git diff <options> <rev>{0,2} -- <path>*";
 
 static void stuff_change(struct diff_options *opt,
                         unsigned old_mode, unsigned new_mode,
@@ -268,7 +268,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
         */
 
        prefix = setup_git_directory_gently(&nongit);
-       git_config(git_diff_ui_config);
+       git_config(git_diff_ui_config, NULL);
 
        if (diff_use_color_default == -1)
                diff_use_color_default = git_use_color_default;
@@ -296,7 +296,8 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
         * If the user asked for our exit code then don't start a
         * pager or we would end up reporting its exit code instead.
         */
-       if (!DIFF_OPT_TST(&rev.diffopt, EXIT_WITH_STATUS))
+       if (!DIFF_OPT_TST(&rev.diffopt, EXIT_WITH_STATUS) &&
+           check_pager_config("diff") != 0)
                setup_pager();
 
        /*