Make the unpacked object header functions static to sha1_file.c
[gitweb.git] / builtin-diff.c
index 47e0a37e212d9a7085714d1b5d6d8f2ffda8d5a6..ae901dd25ea4d8d82752db5b28f354fd2eadfb56 100644 (file)
@@ -176,7 +176,7 @@ static int builtin_diff_tree(struct rev_info *revs,
                usage(builtin_diff_usage);
 
        /* We saw two trees, ent[0] and ent[1].
-        * if ent[1] is unintesting, they are swapped
+        * if ent[1] is uninteresting, they are swapped
         */
        if (ent[1].item->flags & UNINTERESTING)
                swap = 1;
@@ -250,12 +250,14 @@ int cmd_diff(int argc, const char **argv, char **envp)
         * Other cases are errors.
         */
 
-       git_config(git_diff_config);
+       git_config(git_diff_ui_config);
        init_revisions(&rev);
 
        argc = setup_revisions(argc, argv, &rev, NULL);
-       if (!rev.diffopt.output_format)
+       if (!rev.diffopt.output_format) {
                rev.diffopt.output_format = DIFF_FORMAT_PATCH;
+               diff_setup_done(&rev.diffopt);
+       }
 
        /* Do we have --cached and not have a pending object, then
         * default to HEAD by hand.  Eek.