From: Russell Belfer Date: Fri, 2 Mar 2012 23:57:06 +0000 (-0800) Subject: Fixes for merge of filters branch X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=529df4dfe54c61b40b96abbafb420e9034a1a4a8;p=libgit2.git Fixes for merge of filters branch --- diff --git a/src/diff_output.c b/src/diff_output.c index 84935182d..5e7486ab8 100644 --- a/src/diff_output.c +++ b/src/diff_output.c @@ -93,9 +93,9 @@ static int set_file_is_binary_by_attr(git_repository *repo, git_diff_file *file) int error = git_attr_get(repo, file->path, "diff", &value); if (error != GIT_SUCCESS) return error; - if (value == GIT_ATTR_FALSE) + if (GIT_ATTR_FALSE(value)) file->flags |= GIT_DIFF_FILE_BINARY; - else if (value == GIT_ATTR_TRUE) + else if (GIT_ATTR_TRUE(value)) file->flags |= GIT_DIFF_FILE_NOT_BINARY; /* otherwise leave file->flags alone */ return error; diff --git a/tests-clar/attr/repo.c b/tests-clar/attr/repo.c index 2afea23d6..4de4afaa7 100644 --- a/tests-clar/attr/repo.c +++ b/tests-clar/attr/repo.c @@ -67,6 +67,7 @@ void test_attr_repo__get_one(void) }, *scan; for (scan = test_cases; scan->path != NULL; scan++) { + const char *value; cl_git_pass(git_attr_get(g_repo, scan->path, scan->attr, &value)); attr_check_expected(scan->expected, scan->expected_str, value); }