diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-06-20 21:47:30 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-06-20 21:47:30 -0700 |
commit | c28a17f270a51a4ed5e432e83c0ed962361a37c9 (patch) | |
tree | 6b7c829a56d0e09d8f0b80adb1d035889ce14d77 /diff-lib.c | |
parent | deded16d151ff0f7b80ed21a518928daff09c14c (diff) | |
parent | a0919ced8a5efe938cf97c74a0f851cbbe00aaf6 (diff) | |
download | git-c28a17f270a51a4ed5e432e83c0ed962361a37c9.tar.gz |
Merge branch 'jc/cache-tree'
* jc/cache-tree:
Avoid "diff-index --cached" optimization under --find-copies-harder
Optimize "diff-index --cached" using cache-tree
t4007: modernize the style
cache-tree.c::cache_tree_find(): simplify internal API
write-tree --ignore-cache-tree
Diffstat (limited to 'diff-lib.c')
-rw-r--r-- | diff-lib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/diff-lib.c b/diff-lib.c index 0aba6cda3c..ad2a4cde74 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -446,6 +446,8 @@ int run_diff_index(struct rev_info *revs, int cached) memset(&opts, 0, sizeof(opts)); opts.head_idx = 1; opts.index_only = cached; + opts.diff_index_cached = (cached && + !DIFF_OPT_TST(&revs->diffopt, FIND_COPIES_HARDER)); opts.merge = 1; opts.fn = oneway_diff; opts.unpack_data = revs; @@ -502,6 +504,7 @@ int do_diff_cache(const unsigned char *tree_sha1, struct diff_options *opt) memset(&opts, 0, sizeof(opts)); opts.head_idx = 1; opts.index_only = 1; + opts.diff_index_cached = !DIFF_OPT_TST(opt, FIND_COPIES_HARDER); opts.merge = 1; opts.fn = oneway_diff; opts.unpack_data = &revs; |