aboutsummaryrefslogtreecommitdiff
path: root/read-tree.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-05 23:38:18 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-05 23:38:18 -0700
commitd925ffbd064802bc8a6ab0bccf0c43b00a7fe710 (patch)
tree0df7d7212b2a6d7514c8726d120b2f34e41b1893 /read-tree.c
parentc3f13d59f75e144e615b4a5b480348057a7b8b3f (diff)
downloadgit-d925ffbd064802bc8a6ab0bccf0c43b00a7fe710.tar.gz
git-d925ffbd064802bc8a6ab0bccf0c43b00a7fe710.tar.xz
Fix off-by-one in new three-way-merge updates
That's the final one ("Yeah, sure, we believe you"). Anyway, at least the tests pass, which is not saying a lot, since they don't end up testing all the new the things that the new merge world order tries to do. But hopefully we're now at least not any worse off than we were before the rewrite.
Diffstat (limited to 'read-tree.c')
-rw-r--r--read-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/read-tree.c b/read-tree.c
index b72ee1c54..90c0ee522 100644
--- a/read-tree.c
+++ b/read-tree.c
@@ -146,7 +146,7 @@ static void trivially_merge_cache(struct cache_entry **src, int nr)
}
if (old && !path_matches(old, ce))
reject_merge(old);
- if (nr > 2 && (result = merge_entries(ce, src[0], src[1])) != NULL) {
+ if (nr > 1 && (result = merge_entries(ce, src[0], src[1])) != NULL) {
result->ce_flags |= htons(CE_UPDATE);
/*
* See if we can re-use the old CE directly?