Fixes for merge of filters branch

This commit is contained in:
Russell Belfer 2012-03-02 15:57:06 -08:00
parent e1bcc19110
commit 529df4dfe5
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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);
}