projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
apply --cached: apply a patch without using working tree.
[git.git]
/
builtin-diff.c
diff --git
a/builtin-diff.c
b/builtin-diff.c
index
c543105
..
d3ac581
100644
(file)
--- a/
builtin-diff.c
+++ b/
builtin-diff.c
@@
-84,8
+84,7
@@
static void stuff_change(struct diff_options *opt,
if (opt->reverse_diff) {
unsigned tmp;
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;
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.
*/
*
* Other cases are errors.
*/
-
+
git_config(git_diff_config);
init_revisions(&rev);
rev.diffopt.output_format = DIFF_FORMAT_PATCH;
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'",
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;
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;
blob[blobs].name = name;
blobs++;
continue;
-
+
}
die("unhandled object '%s' given.", name);
}
}
die("unhandled object '%s' given.", name);
}