1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-08 09:46:08 +02:00

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.
This commit is contained in:
Linus Torvalds 2005-06-05 23:38:18 -07:00
parent c3f13d59f7
commit d925ffbd06

View File

@ -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?