|
|
|
@ -542,7 +542,7 @@ int do_diff_cache(const struct object_id *tree_oid, struct diff_options *opt)
@@ -542,7 +542,7 @@ int do_diff_cache(const struct object_id *tree_oid, struct diff_options *opt)
|
|
|
|
|
{ |
|
|
|
|
struct rev_info revs; |
|
|
|
|
|
|
|
|
|
repo_init_revisions(the_repository, &revs, NULL); |
|
|
|
|
repo_init_revisions(opt->repo, &revs, NULL); |
|
|
|
|
copy_pathspec(&revs.prune_data, &opt->pathspec); |
|
|
|
|
revs.diffopt = *opt; |
|
|
|
|
|
|
|
|
@ -551,13 +551,14 @@ int do_diff_cache(const struct object_id *tree_oid, struct diff_options *opt)
@@ -551,13 +551,14 @@ int do_diff_cache(const struct object_id *tree_oid, struct diff_options *opt)
|
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int index_differs_from(const char *def, const struct diff_flags *flags, |
|
|
|
|
int index_differs_from(struct repository *r, |
|
|
|
|
const char *def, const struct diff_flags *flags, |
|
|
|
|
int ita_invisible_in_index) |
|
|
|
|
{ |
|
|
|
|
struct rev_info rev; |
|
|
|
|
struct setup_revision_opt opt; |
|
|
|
|
|
|
|
|
|
repo_init_revisions(the_repository, &rev, NULL); |
|
|
|
|
repo_init_revisions(r, &rev, NULL); |
|
|
|
|
memset(&opt, 0, sizeof(opt)); |
|
|
|
|
opt.def = def; |
|
|
|
|
setup_revisions(0, NULL, &rev, &opt); |
|
|
|
|