X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-diff.c;h=c387ebb16c6bd353a84abd9454892eeab309ef1e;hb=0425ea90889f967c3966ace3e5a85b9a5a44c358;hp=1c535b1dd620ce40814da41bdddb8638cafeceb4;hpb=efe2c9e0024bf779585a6cdc3651af5a0f8bac72;p=git.git diff --git a/builtin-diff.c b/builtin-diff.c index 1c535b1dd..c387ebb16 100644 --- a/builtin-diff.c +++ b/builtin-diff.c @@ -137,7 +137,7 @@ static int builtin_diff_index(struct rev_info *revs, int cached = 0; while (1 < argc) { const char *arg = argv[1]; - if (!strcmp(arg, "--index") || !strcmp(arg, "--cached")) + if (!strcmp(arg, "--cached")) cached = 1; else usage(builtin_diff_usage); @@ -192,7 +192,8 @@ static int builtin_diff_combined(struct rev_info *revs, parent = xmalloc(ents * sizeof(*parent)); /* Again, the revs are all reverse */ for (i = 0; i < ents; i++) - hashcpy((unsigned char*)parent + i, ent[ents - 1 - i].item->sha1); + hashcpy((unsigned char *)(parent + i), + ent[ents - 1 - i].item->sha1); diff_tree_combined(parent[0], parent + 1, ents - 1, revs->dense_combined_merges, revs); return 0;