Commit 1835c51f58a670e23c9546f942259d53fe626fa2

Russell Belfer 2012-05-29T09:59:55

Merge pull request #735 from gregier/development Fix checking for the presence of a flag

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/diff_output.c b/src/diff_output.c
index ba7ef82..5ffa641 100644
--- a/src/diff_output.c
+++ b/src/diff_output.c
@@ -387,7 +387,7 @@ int git_diff_foreach(
 			if (error < 0)
 				goto cleanup;
 
-			if ((delta->new_file.flags | GIT_DIFF_FILE_VALID_OID) == 0) {
+			if ((delta->new_file.flags & GIT_DIFF_FILE_VALID_OID) == 0) {
 				error = git_odb_hash(
 					&delta->new_file.oid, new_data.data, new_data.len, GIT_OBJ_BLOB);