summaryrefslogtreecommitdiff
path: root/diff-lib.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-01-25 01:35:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-01-25 01:35:58 (GMT)
commit026680f881e751311674d97d0f6ed87f06a92bfb (patch)
tree770bcfc2a3746cd568fbe17fea2926f6da2c7fa8 /diff-lib.c
parenteca9388f398eb3256fafbf875a8a4ff5a73ab6f2 (diff)
parentba655da537a999670c7b21e0446e774a1f9733ea (diff)
downloadgit-026680f881e751311674d97d0f6ed87f06a92bfb.zip
git-026680f881e751311674d97d0f6ed87f06a92bfb.tar.gz
git-026680f881e751311674d97d0f6ed87f06a92bfb.tar.bz2
Merge branch 'jc/fix-tree-walk'
* jc/fix-tree-walk: read-tree --debug-unpack unpack-trees.c: look ahead in the index unpack-trees.c: prepare for looking ahead in the index Aggressive three-way merge: fix D/F case traverse_trees(): handle D/F conflict case sanely more D/F conflict tests tests: move convenience regexp to match object names to test-lib.sh Conflicts: builtin-read-tree.c unpack-trees.c unpack-trees.h
Diffstat (limited to 'diff-lib.c')
-rw-r--r--diff-lib.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/diff-lib.c b/diff-lib.c
index 23e180e..ec2e2ac 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -380,21 +380,6 @@ static void do_oneway_diff(struct unpack_trees_options *o,
show_modified(revs, tree, idx, 1, cached, match_missing);
}
-static inline void skip_same_name(struct cache_entry *ce, struct unpack_trees_options *o)
-{
- int len = ce_namelen(ce);
- const struct index_state *index = o->src_index;
-
- while (o->pos < index->cache_nr) {
- struct cache_entry *next = index->cache[o->pos];
- if (len != ce_namelen(next))
- break;
- if (memcmp(ce->name, next->name, len))
- break;
- o->pos++;
- }
-}
-
/*
* The unpack_trees() interface is designed for merging, so
* the different source entries are designed primarily for
@@ -416,9 +401,6 @@ static int oneway_diff(struct cache_entry **src, struct unpack_trees_options *o)
struct cache_entry *tree = src[1];
struct rev_info *revs = o->unpack_data;
- if (idx && ce_stage(idx))
- skip_same_name(idx, o);
-
/*
* Unpack-trees generates a DF/conflict entry if
* there was a directory in the index and a tree
@@ -464,6 +446,7 @@ int run_diff_index(struct rev_info *revs, int cached)
exit(128);
diff_set_mnemonic_prefix(&revs->diffopt, "c/", cached ? "i/" : "w/");
+ diffcore_fix_diff_index(&revs->diffopt);
diffcore_std(&revs->diffopt);
diff_flush(&revs->diffopt);
return 0;