unpack_trees(): fix diff-index regression.

When skip_unmerged option is not given, unpack_trees() should not just
skip unmerged cache entries but keep them in the result for the caller to
sort them out.

For callers other than diff-index, the incoming index should never be
unmerged, but diff-index is a special case caller.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Linus Torvalds
2008-03-10 23:51:13 -07:00
committed by Junio C Hamano
parent 542c264b01
commit 20a16eb33e
2 changed files with 18 additions and 2 deletions

View File

@ -116,7 +116,6 @@ static int unpack_index_entry(struct cache_entry *ce, struct unpack_trees_option
add_entry(o, ce, 0, 0);
return 0;
}
return 0;
}
return call_unpack_fn(src, o);
}
@ -286,7 +285,6 @@ static int unpack_callback(int n, unsigned long mask, unsigned long dirmask, str
add_entry(o, ce, 0, 0);
return mask;
}
continue;
}
src[0] = ce;
}