Open yoichi opened 2 years ago
My concern is that building the patch would be a waste of time if the flags are not used later. The alternative would be to build the patch lazily, when the flags are asked for, but this may not be easy.
I've done the related commit 464836c7 , if none of GIT_DIFF_FLAG_BINARY
and GIT_DIFF_FLAG_NOT_BINARY
have been set then the flags have not been loaded and the patch should be built.
diff_get_delta_byindex() may result incorrect value of delta->flags as described in the comment of git_diff_get_delta() (git2/diff.h)
this pull request fixes #962