aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/diff.c b/diff.c
index e4efb657e..dcea405ed 100644
--- a/diff.c
+++ b/diff.c
@@ -1069,8 +1069,9 @@ static int file_is_binary(struct diff_filespec *one)
setup_diff_attr_check(&attr_diff_check);
if (!git_checkattr(one->path, 1, &attr_diff_check) &&
- (0 == attr_diff_check.isset))
- return 1;
+ (0 <= attr_diff_check.isset))
+ return !attr_diff_check.isset;
+
if (!one->data) {
if (!DIFF_FILE_VALID(one))
return 0;