diff options
author | Junio C Hamano <junkio@cox.net> | 2007-04-15 14:35:11 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-15 14:35:11 -0700 |
commit | 40250af411f33afa0c39a5d461829b676453ce3b (patch) | |
tree | 0530d85b4a658ecd9c512ce44cea1ceabcd35d98 | |
parent | 201ac8efc79668353281583629aa15ac7f36e843 (diff) | |
download | git-40250af411f33afa0c39a5d461829b676453ce3b.tar.gz git-40250af411f33afa0c39a5d461829b676453ce3b.tar.xz |
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>
-rw-r--r-- | diff.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |