diff.c: allow to pass more flags to diff_populate_filespec

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2014-08-16 10:08:04 +07:00
committed by Junio C Hamano
parent 735efde838
commit 8e5dd3d654
3 changed files with 13 additions and 9 deletions

View File

@ -147,9 +147,11 @@ static int estimate_similarity(struct diff_filespec *src,
* is a possible size - we really should have a flag to
* say whether the size is valid or not!)
*/
if (!src->cnt_data && diff_populate_filespec(src, 1))
if (!src->cnt_data &&
diff_populate_filespec(src, CHECK_SIZE_ONLY))
return 0;
if (!dst->cnt_data && diff_populate_filespec(dst, 1))
if (!dst->cnt_data &&
diff_populate_filespec(dst, CHECK_SIZE_ONLY))
return 0;
max_size = ((src->size > dst->size) ? src->size : dst->size);