apply --whitespace=fix: fix handling of blank lines at the eof
[gitweb.git] / builtin-diff-tree.c
index 9ab90cb4c535a1328806c05515ba089e1d7147dc..415cb1612f5322da89850874ba81885e41808678 100644 (file)
@@ -53,7 +53,7 @@ static int diff_tree_stdin(char *line)
 }
 
 static const char diff_tree_usage[] =
-"git-diff-tree [--stdin] [-m] [-c] [--cc] [-s] [-v] [--pretty] [-t] [-r] [--root] "
+"git diff-tree [--stdin] [-m] [-c] [--cc] [-s] [-v] [--pretty] [-t] [-r] [--root] "
 "[<common diff options>] <tree-ish> [<tree-ish>] [<path>...]\n"
 "  -r            diff recursively\n"
 "  --root        include the initial commit as diff against /dev/null\n"
@@ -68,7 +68,7 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
        int read_stdin = 0;
 
        init_revisions(opt, prefix);
-       git_config(git_default_config); /* no "diff" UI options */
+       git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
        nr_sha1 = 0;
        opt->abbrev = 0;
        opt->diff = 1;
@@ -132,8 +132,6 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
                                diff_tree_stdin(line);
                }
        }
-       if (opt->diffopt.output_format & DIFF_FORMAT_CHECKDIFF)
-               return DIFF_OPT_TST(&opt->diffopt, CHECK_FAILED) != 0;
-       return DIFF_OPT_TST(&opt->diffopt, EXIT_WITH_STATUS)
-               && DIFF_OPT_TST(&opt->diffopt, HAS_CHANGES);
+
+       return diff_result_code(&opt->diffopt, 0);
 }