@matheusbsbs / matheus-bagliano / commits / 40250af411
Fork 0

Fix 'diff' attribute semantics.

This is in the same spirit as the previous one. Earlier 'diff' meant 'do the built-in binary heuristics and disable patch text generation based on it' while '!diff' meant 'do not guess, do not generate patch text'. There was no way to say 'do generate patch text even when the heuristics says it has NUL in it'. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Apr 15, 2007 at 14:35 UTC 40250af411f33afa0c39a5d461829b676453ce3b
1 file changed +3 -2
diff.c
+3 -2
@@ -1069,8 +1069,9 @@ static int file_is_binary(struct diff_filespec *one)
1069
1070 setup_diff_attr_check(&attr_diff_check);
1071 if (!git_checkattr(one->path, 1, &attr_diff_check) &&
1072 - (0 == attr_diff_check.isset))
1073 - return 1;
1072 + (0 <= attr_diff_check.isset))
1073 + return !attr_diff_check.isset;
1074 +
1075 if (!one->data) {
1076 if (!DIFF_FILE_VALID(one))
1077 return 0;