apply --cached: do not check newly added file in the working tree
[gitweb.git] / builtin-diff.c
index c543105b8ef6192d20fb844e489164f0a39dbe30..d3ac581f291dae630478248133344e2dd6a80b06 100644 (file)
@@ -84,8 +84,7 @@ static void stuff_change(struct diff_options *opt,
 
        if (opt->reverse_diff) {
                unsigned tmp;
-               const
-                       const unsigned char *tmp_u;
+               const unsigned char *tmp_u;
                const char *tmp_c;
                tmp = old_mode; old_mode = new_mode; new_mode = tmp;
                tmp_u = old_sha1; old_sha1 = new_sha1; new_sha1 = tmp_u;
@@ -271,7 +270,7 @@ int cmd_diff(int argc, const char **argv, char **envp)
         *
         * Other cases are errors.
         */
-       
+
        git_config(git_diff_config);
        init_revisions(&rev);
        rev.diffopt.output_format = DIFF_FORMAT_PATCH;
@@ -307,7 +306,7 @@ int cmd_diff(int argc, const char **argv, char **envp)
                if (!strcmp(obj->type, tree_type)) {
                        if (ARRAY_SIZE(ent) <= ents)
                                die("more than %d trees given: '%s'",
-                                   ARRAY_SIZE(ent), name);
+                                   (int) ARRAY_SIZE(ent), name);
                        obj->flags |= flags;
                        ent[ents].item = obj;
                        ent[ents].name = name;
@@ -321,7 +320,7 @@ int cmd_diff(int argc, const char **argv, char **envp)
                        blob[blobs].name = name;
                        blobs++;
                        continue;
-                       
+
                }
                die("unhandled object '%s' given.", name);
        }