X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=diff-index.c;h=12a9418d6bbec35d2e5bc0010aff4366e63d7440;hb=ac5a85181ac18b0119705f46cfa825389643df33;hp=bbd873ba13306ed87f89ea5a4315bfe7ce794c7e;hpb=521698b1538fb3c9bd818ee98f2c17d2c80c9605;p=git.git diff --git a/diff-index.c b/diff-index.c index bbd873ba..12a9418d 100644 --- a/diff-index.c +++ b/diff-index.c @@ -33,7 +33,7 @@ static int get_stat_data(struct cache_entry *ce, } return -1; } - changed = ce_match_stat(ce, &st); + changed = ce_match_stat(ce, &st, 0); if (changed) { mode = create_ce_mode(st.st_mode); if (!trust_executable_bit && @@ -201,6 +201,14 @@ int main(int argc, const char **argv) /* We accept the -r flag just to look like git-diff-tree */ continue; } + if (!strcmp(arg, "--cc")) + /* + * I _think_ "diff-index --cached HEAD" with an + * unmerged index could show something else + * later, but pretend --cc is the same as -p for + * now. "git diff" uses --cc by default. + */ + argv[i] = arg = "-p"; diff_opt_cnt = diff_opt_parse(&diff_options, argv + i, argc - i); if (diff_opt_cnt < 0)